If this was true in every circumstance, please consider why "market makers"[1] exist within the NYSE and London stock exchanges. If the stock market itself provides the value, buyers and sellers should find "market makers" redundant with zero value-added -- but that doesn't happen.
Therefore, I propose that one doesn't compare investment bank IPO underwriters to a naked stock exchange. Instead, compare the underwriter to a "market maker". The underwriter can be seen as the first market maker for the initial offering. That's worth something to many owners of companies looking to get liquidity.
[1] https://en.wikipedia.org/wiki/Market_maker#In_stock_exchange
The underwriter is like a market maker only in the fact that it is taking principal risk when it purchases the shares. It typically already has buyers lined up for all the shares and it does not face risk from the price changing between when the IPO is priced and trading starts. That is not to say that the bank is not without risk. It has obligations like price support for the IPO.
If you are selling before any price discovery is on, you are either getting screwed; or your investors are. If the investment bank could figure out the right price for the shares, why have the stock exchange in the first place.