Profit is only one part of the overhead. They also have to pay agents, adjusters, underwriters, managers, office stationary, postage, fraud investigators, lawyers, taxes, interest on bonds etc.
Similar for hospitals etc. Profit, ie cost of equity capital, is usually (but not always) a relatively small part of an organisation's overall cost structure. And the non-profit alternatives typically don't have meaningfully lower costs.