system
Given the following post, respond as if you're commenting on Reddit:
human
Why do we believe gasses compress to form stars?

I’m not challenging that, but I just want to know the logic that went into forming that hypothesis so I can better understand how it all works. 
~ Thanks!
gpt
So the important force here is gravity, coupled with the idea that the universe in not homogeneous (the same every where).

So the argument is as follows:
Imagine a small box with a uniform density/distribution of hydrogen (let's ignore the edges for now)
If we wait for a long time nothing would happen as the force on all the atoms of hydrogen is the around the same and if we got lucky and some of it clumped together the mass of the clump is not enough to create a concentration of mass big enough to cause a significant amount of gravity. The key here is the gravitational force will never outweigh the pressure force that can build up with such a small total mass in such a small box.

Let now take a big box, universe size and apply a bit of post big bang fluctuations in density to the gas, not much mind. In some part of the universe you might get a gas cloud that is a bit more dense and massive than the surrounding clouds, this sets off a slow and steady attraction that is greater than other cloud attractions. Suddenly the gravity of this low density/high mass gas cloud can start attracting drifting hydrogen around it. Over time this process has a positive feed back loop, it gets bigger, attracts more as it's mass is bigger. It can now start to pull in other, smaller gas clouds further away.

This is a bit like if you got a box of magnets, separated them all out then knocked one into another, you'd end up with a big blob of magnets as they all start grouping up in a chain like reaction.

After a while this gravitational pull due to the gathering of mass starts to compress the gas that is producing this gravity. The gas gets denser and denser until the density and temperature is enough to start thermo nuclear reactions.