As the title suggests, why is this?
Is it because the distance of molecules in a gas is too large (compared to in liquids/solids)? Or are there other reasons for this?
The state of equilibrium is characterised by a minimum in free energy $F=U-TS$ (Helmholtz for simplicity), not a minimum in potential energy.
What this means is that while the system is indeed attempting to minimise the potential energy $U$, it is simultaneously trying to maximise the entropy $S$. The balance, i.e. which term dominates, is determined by the temperature $T$.
At high temperatures, entropy (which favours spaced out, randomly disordered atoms) dominates. This can also be understood from an atomistic perspective: at high temperatures, the atoms are randomly jiggling at high velocities and therefore have a tendency to break any bonds that form.