It's not always the case that all of the shares are sold in the IPO. Some are allocated to board members and investors. Those people will negotiate a share count based on the IPO price. I may feel entitled to 5% of the company, they may offer 3%, but might only be able to negotiate 4%. But if the shares will double in value after the pop? I'm perfectly fine with that. I know that. I expect that.
There's an incentive for me to fight for shares as if there is no pop, but then agree to the IPO term sheet knowing that there will be.
You're correct that the whole company "goes public" at the same time. But that just means it becomes legal to sell shares to small investors, and the company becomes subject to the reporting requirements, etc. The previous owners still typically own most of the shares, and (almost always) are forbidden to sell them for around 6 months after the IPO.
[0] https://www.nytimes.com/2020/12/09/business/airbnb-ipo-price...
This is why dilution happens too - new shares are created so that they can be sold.
Because in almost all countries politicians have been bought off one way or the other by banks.
But don't banks compete for the IPO business by telling the company what a high price they will list it for? That doesn't solve the problem of a bank saying they'll list for a high price, winning the bid, and then coming back later and saying that intervening events cause them to think it should be listed lower.
But presumably companies that are about to IPO have advisors/lawyers who can see these sorts of shenanigans coming and fight against them?