Sure, gases expand in a vacuum- relative to their compressed state in an atmosphere. But they only expand so far, and if there is enough, then gravity will pull them together and form stars. It's not rocket science.
This is of course aside from the observation of star formation, for instance in the Orion Nebula.
You were born. And so you're free. So happy birthday.
- Laurie Anderson