Let me elaborate on Mordred's comment.Perfect homogenity is unstable, in the same way as a needle standing on its sharp end is. It tends to be disrupted by the slightest of random motions and never reverts to the initial state.
Once a localised density spike appears in a uniform gas cloud, it gets exaggerated as it collapeses, and forms structures like groups of galaxies, galaxies themselves, stars and planets, depending on scale. Further collapse can be stopped by the conservation of angular momentum and (on small scales) internal kinetic energy of gas molecules(temperature) and radiation pressure.
Here's a nice simple program on Khan Academy that simulates a small, rotating cloud of particles collapsing under its own gravity:
http://www.khanacademy.org/cs/challenge-modeling-accretion-disks/1180451277
It might help in visualising the "lumping" of material.
You can change the variables, including the rotation and "star" formation rules.
Anyway. Gravity works well if the time scale is huge, or spatial scale is small(stars, planets etc.). So, once you end up with lumps of gas floating around a galaxy, they tend to stay roughly undisturbed. They're very diffuse, and often hot, so significant gravitational collapse might not happen for a very long time.
Usually there's some event that triggers the collapse, like an earlier star exploding and sending shockwaves through the medium to compress it enough. How much material ends up in any given star ends up pretty much random. (the program linked above illustrates this unpredictability)
So now you've got a number of stars with a range of masses. In the early stages of their lives(
http://en.wikipedia.org/wiki/Main_sequence), it is only mass that determines their size. The larger the bigger(and brighter and hotter).
More massive stars' cores are compressed more highly than low-mass ones, so they produce more heat that pushes the outer parts outward. So the mass-radius relation is different from what you might expect from e.g., the constant density calculations in my post #3.
It looks something like this:
http://www.daviddarling.info/encyclopedia/M/mass-radius_relation.html
(it changes a bit depending on mass range)
The most massive stars theoretically possible have(iirc) ~250 solar masses(more massive would produce enough energy to blow away the extra mass). This one is close:
http://en.wikipedia.org/wiki/R136a1
And it's only ~35 times the radius of the sun.The really huge stars are all in their last phases of life, swelling to enormous proportions due the changing composition of their cores.
http://en.wikipedia.org/wiki/Stellar_evolution
Edit: the one factor I can think of that might influence the size of a star is the elemental composition of the collapsing molecular cloud.
Clouds with heavier elements will produce denser stars that will start fusion earlier. The resultant radiation flux will blow away the surrounding material that otherwise would accrete onto the star.