An IPO is basically a way for the company to raise money, but tis time straight from the public. Usually when it gets harder and harder for them to attract private investors. The IPO listing basically guarantees that they won't take the public's billions and run.
Successful companies with perfect cash flows (think of Github, Valve, IKEA) always try to remain private. Because they have nothing to gain by raising more money. They can give their employees good bonuses and maintain control of the company.
This is by design. In Silicon Valley we are obsessed with them because they are the only meaningful exit for common employees (take the money and run mentality). The rest of the world doesn't care much because they see them for what they are.
Of course. Startup employees do not know they can sell their 'private' stock already, today. However, they need permissions to do so from the company's board (their answer will be NO. Here, saved you from asking. Or maybe they will offer to buy back the stock with shitty terms), and can only sell them to an accredited investor and not random people/public.
Many companies would be ran better if they remained private (think of Facebook, which now has investor pressure to increase the price, which results in careless decisions about data handling, privacy etc).