While those are the "theoretical" reason for IPOs, let's not ignore a primary reason for an IPO, which is to let early investors and employees cash out (though these days many companies, e.g. Slack, are just doing a direct listing instead).
> Slack Technologies Inc. is set to go public on Thursday using a nontraditional process called a direct listing. Only one other big company, Spotify Technology SA, has gone public in this way.