Why a company needs an underwriter
Without an underwriter, there is the possibility that the company will not be able to gather enough interest in its shares to raise the desired capital amount. It may fall short or not get any traction at all. The underwriter is essentially the salesmen of the IPO, and they help to find the right investors for the company. Without an underwriter, an IPO can be doomed to fail from the outset.
The underwriter(s) may purchase all of the shares from the company at a set price (so that the company raises exactly the amount they are seeking), and if the underwriter can sell the shares above and beyond that price, they pocket this as their fee. This is a fully underwritten IPO. It gives the company certainty that they will raise the amount required, and is generally a sign that the underwriter is confident they can sell any remaining shares at a profit in the secondary market when required.
In some cases the underwriter may partially underwrite the issue, where they purchase only a portion of the shares on offer to sell and the rest are left for the market to determine if they are interested.
But in many cases the underwriter(s) will engage with the company on a “best efforts” basis, whereby they agree to sell as many shares as possible but don’t purchase any remaining shares where the IPO is undersubscribed (receives less interest than anticipated and shares remain unallocated). The underwriter receives a portion of the sale price for every share sold, so it’s in their best interests to sell as much of the offer as they can.
There’s also the matter of listing documentation and regulatory filings that companies need to collate and present, and underwriters handle this process for them.