Are elements commutative when subgroups are?

Not necessarily.

Let $H_1$ and $H_2$ be subgroups of $G$. Then $H_1H_2 = H_2H_1$ if and only if $H_1H_2$ is a subgroup.

Thus if for example every subgroup of $G$ is normal, then $H_1H_2$ is always a subgroup. The quaternion group of order $8$ is a nonabelian group where every subgroup is normal.