Why isn't $\mathbb{Z}_2 \times \mathbb{Z}_{30}$ isomorphic to $\mathbb{Z}_{60}$? I know that other groups like $\mathbb{Z}_4 \times \mathbb{Z}_3 \times \mathbb{Z}_5$ are isomorphic to $\mathbb{Z}_{60}$. 

In general, $\mathbb{Z}_n \times \mathbb{Z}_m \cong \mathbb{Z}_{nm} \iff \operatorname{gcd}(n, m) = 1$.  
Even more generally, $\mathbb{Z}_{n_1} \times \mathbb{Z}_{n_2} \times \cdots \times \mathbb{Z}_{n_k} \cong \mathbb{Z}_{n_1n_2...n_k} \iff \operatorname{gcd}(n_k, n_j) = 1$ whenever $k \neq j$.

Proof of the first claim:
$\implies$ We will show the contrapositive: suppose $d = \gcd(n, m) \neq 1$.  Then $x = \displaystyle \frac{mn}{d}$ is an integer, and in particular $x = \operatorname{lcm}(m, n)$.  An element $(a, b)$ of a direct product of groups has order $\operatorname{lcm}(|a|, |b|)$.  So consider an element $(a, b) \in \mathbb{Z}_m \times \mathbb{Z}_n$.  The order of $a$ in $\mathbb{Z}_n$ divides $n$, and likewise the order of $b$ divides $m$.  From this we see that the order of $(a, b)$ divides $x$.  Hence, every element of $\mathbb{Z}_m \times \mathbb{Z}_n$ has an order that divides $x$, which is strictly less than the order of the group.   In particular, no element can have order $mn$, so the group cannot be cyclic.
$\ \ $
$\Longleftarrow \ $  Now suppose $\gcd(n, m) = 1$.  The generator $x$ of $\mathbb{Z}_n$ has order $n$, and likewise the generator $y$ of $\mathbb{Z}_m$ has order $m$.  We have $\operatorname{lcm}(|x|, |y|) = |x| \cdot |y| = mn$, which is the order of $\mathbb{Z}_n \times \mathbb{Z}_m$.  Hence, $(x, y)$ generates the group, and it is cyclic. 
$\blacksquare$
The general claim follows per an inductive argument.

Note concerning the above proof: We used the fact that $\displaystyle \operatorname{lcm}(x, y) = \frac{xy}{\gcd(x, y)}$ for all $ x, y \in \mathbb{N}$.
