An IPO is where the investors cash out to spend money on something else. It’s where the founders and early employees get rich enough to start chasing other interests, or just retire outright.
That certainly comes with the territory. However, being a public company offers a lot of opportunity for the company - easier access to capital, to enterprise/government contracts, and attracting talent that want less risky compensation.
My understanding is that the underwriting bank and early investors and institutional investors win first, then founders, after that early employees. Usually offloaded onto the robinhood crowd who excitedly buys in.