You don't understand the IPO process.
Normally, it is a company with more opportunity than capital. So it creates additional shares and then sells it during the IPO. This process is just like raising capital with VCs, except the term sheet is effectively between the new investors and the company, with the SEC adding all sorts of post-its with additional conditions.
Only since bubble v1 was it seen as some sort of "achievement" for a company; An IPO is nothing more than a poor company begging for money and willing to cause dilution in order to fill its tin cup.