Let $\kappa$ be an inaccessible cardinal, and let $I \to V_\kappa$ be a function, where $I \in V_\kappa$ and $\forall i \in I, f(i) \in V_\kappa$.
Why would $\bigcup_{i \in I} f(i)$ be in $V_\kappa$?
The following result could be useful, I guess, but I can neither find nor come up with it's proof myself:
If $\kappa$ is an inaccessible cardinal, then $\forall x, x \in V_\kappa \Leftrightarrow x \subseteq V_\kappa, |x| < \kappa$.
If we know the latter result, of course, the the first one is a trivial corollary: as $I, f(i)$'s $ \in V_\kappa$, then $|I|,|f(i)|$'s $< \kappa$, and $\kappa$ regular implies $|\bigcup_{i \in I} f(i)| < \kappa;$ and $\bigcup_{i \in I} f(i) \subseteq V_\kappa$.
I conjecture somehow the knowledge of $\kappa$ being strong limit. As of now, there must be some other connection of $V_\alpha$ with the concept of cardinality I'm not aware of.
If $x\subset \kappa$, we can define $rk : x\to \kappa$ by $rk(y) := \min\{\alpha\in \kappa \mid y\in V_\alpha\}$.
If moreover $|x|<\kappa$, then $rk$ cannot be cofinal since $\kappa$ is regular. Therefore it is bounded above, say by $\delta<\kappa$. Therefore $x\subset V_\delta$, $x\in V_{\delta+1}\subset V_\kappa$, so $x\in V_\kappa$
Conversely if $x\in V_\kappa$, then clearly $x\subset V_\kappa$. Moreover one can prove by induction that $|V_\alpha| <\kappa$ for $\alpha < \kappa$ : this is clearly true for $\alpha= 0$, it goes through at successor stages since $\kappa$ is strong limit, and at limit stages since $\kappa$ is regular.