Ride hailing is going public. According to Reuters, both Uber and Lyft are on course for an initial public offering this year. Lyft will probably debut later this month. Uber is readying the paperwork and the Wall Street roadshow that will likely end with it going public in April. Investors are all aflutter.

But what's the point of an initial public offering in the first place? The answer to that is not as clear as you might assume.

An initial public offering (or IPO) is when a company first sells its shares for purchase on public stock exchanges. After an IPO, the company is tradable on the stock markets. Before an IPO, the only investors a company gets money from are private investors. Between Uber, Lyft, and a number of other tech companies, Wall Street observers think 2019 could be a banner year for IPOs, raising a whopping $200 billion in total.

That's the simple answer, then: Companies do IPOs to raise money that they can plow into expanding their business.

But this is also where things get weird, because Uber actually doesn't need the money. Private investors are still lining up to offer it financing. Uber is already working with the investing giant Softbank as well as a number of investment firms. Nor is this unique to Uber: Plenty of companies do IPOs even though they're already flush with private investment and in no need of cash. If you're a startup, your investors are private. You generally only open the door to public investors after you've matured as a company.

There's also a larger context here: The vast majority of money that companies use to hire new employees, open new stores, buy equipment, or otherwise expand comes from either loans or revenue. Certainly for most public companies, Wall Street plays a very small role.

In fact, it's often closer to the opposite. In 2014, for example, American IPOs raised a total of $90 billion. And that itself was high up until that point — from roughly 2005 to 2015, the average was $45 billion annually. Throw in private venture capital, and the amount of money going from investors and into companies in 2014 was maybe $200 billion. That same year, company payouts to shareholders — in the form of dividends and buybacks and such — totaled more than $1.2 trillion. Far more money leaves companies for Wall Street and investors than vice versa.

This really shouldn't be surprising, since the vast majority of what happens on the stock market is traders buying and selling shares between each other. Traders buying new stock from companies is an extremely small part of the mix. IPOs may raise $45 billion, $90 billion, or even $200 billion in a year. But the U.S. stock market sees roughly $300 billion in trades each day.

There was arguably a time, decades ago, when Wall Street was more geared towards raising financing for company expansions. But those days are long gone now.

So is the point of the IPO better corporate governance? Remember, shareholders usually get to elect the corporate board and vote on major company decisions. Since shareholders' own payouts depend on profits, the presumption is they'll make decisions that push companies to be more profitable. The wisdom of the investing crowd is supposed to improve the company's decision-making at the top. That's the theory, anyway — but it's hard to measure.

It's certainly the way Wall Street treats the company, though. An IPO is often taken as a sign that a company has "grown up" and is ready to be run by the adults in the room.

That's an image bump Uber, which has weathered a long list of infamies, could use. In fact, its former CEO Travis Kalanick, who presided over Uber when it was plagued by scandal, was ousted in part to make way for the company's IPO campaign.

Beyond all that, a publicly traded company is also subject to a lot more government regulation and disclosure requirements about its internal finances. An IPO acts as a signal that a company is stable, serious, and responsible enough to obey stricter rules, and to be more transparent with the public.

There's yet another reason to do IPOs, related to all the rest, but also far more cynical. Basically, IPOs cash out those original private investors.

Having sunk their money into a particular company, private investors eventually want a big payday so they can move on to other ventures. IPOs allow companies to swap out their original private investors for a new crop of public ones.

That's half the purpose of IPOs these days. As mentioned, the other half is largely marketing.