So why don't they just stick together instead of remaining separate?
Ah, that's down to quantum mechanics. The electron can only exist in discreet orbits which correspond to the energy they have.
Bear in mind, that the simple view of atoms as containing little balls which are electrons, protons and neutrons, is just a model we use to visualize how the world of subatomic particle work. It's much more subtle than that as described by the laws of quantum mechanics.