The star reaches a critical mass and ignites, blowing away the surrounding material. (OP emphasis)
I think the misunderstanding is that it's not that explosive when the star "lights up". The process is in some sense continuous, so the nuclear reactions start slowly and gradually increase in strength as the star continues to contract, grow, and heat up inside. Once the amount of radiation from the surface becomes sufficiently hot, we can speak of "blowing away" material, but even then it's not violent. The absorption of light in the gas creates a pressure that pushes the gas away. It picks up pace as the star settles down (and depending on how massive the star is), but it's broadly a consistent stream. (Astronomers are probably unwise to use the word "ignite" because all we mean is that the nuclear reaction rates become non-negligible. It's not like a rocket taking off or something.)
Generally, star formation is a poorly-understood process and a hot topic for research. For stars larger than about 7 solar masses, we think that nuclear reactions begin before all the material has gathered in the star. i.e. while some is still flowing on. If this happens through a disk, then the light can stream out everywhere but the equator without much affecting the growth of the star.
That said, at very high masses, you do run into a problem of blowing mass away. For this reason, we don't really expect to see many stars over a few hundred solar masses, and those that are can be violently unstable (like Eta Carina, which threw off about 10 solar masses of material in the mid-19th century).
And as for stars genuinely "blowing up", this does happen in other circumstances. For example, in the core of a solar mass red giant, matter becomes nearly isothermal. It eventually gets hot enough to ignite helium, and it nearly all lights up at nearly the same time in a helium flash. This briefly produces as much light as a small galaxy! But only very briefly, and it doesn't make it to the surface for us to see. Incidentally, this is also the same mechanism as Type Ia supernovae: an isothermal carbon-oxygen white dwarf accretes matter until the carbon lights up, and the whole white dwarf basically ignites at the same time.