Because there are likely many employees and investors who want to cash out.
Going public makes their shares liquid. It's (probably) not reasonable for the company to repurchase that equity or to pay employees pure cash comp.
Sounds like asking for the public to buy them out .
to be a lot more profitable
And how would that happen? They already have the product, which can be sold in huge numbers without really needing to scale operations. Are you suggesting they need cash to rewrite or improve the product?