Just an additional note, some insurers such as mutuals and fraternals have no shareholders. The policyholders receive the profit either directly at the termination of the policy or indirectly through policy dividends or reduced premiums. They make a profit, but each policyholder in a mutual or fraternal is entitled to the extent they contributed to the firm's profitability.
When you buy insurance you are trading a certain loss (the premium) to give up financial uncertainty over a possible future event. If your homeowner's insurance premium were $500 you are absolutely certain that you have lost that money. It is a guaranteed loss. What you have traded is they assume a risk from you so that you can be certain not to be at risk should a defined event occur. They absorb, for example a $500,000 risk, for the premium. The emotional problem with insurance is you really don't want to win the benefit/cost game. You probably don't want to die, be disabled, have your home destroyed, see your children die, have a terrible disease, or see your car totalled.
Even large scale disasters usually do not put insurers under, except possibly local insurers. The insurance industry can honestly boast that no insured in the United States, since the beginning of the insurance guarantee funds, has ever not received what they were entitled to in their contract.
It is important to read the contract though.
As to do we really need them, yes. Insurance permits investors to take risks on third parties that they could not take if the insurers were not absorbing the uncertainty. The Dow would be at 2000 right now if companies had to absorb all of their internal risks. Bank rates would have to be in the double digits to absorb the event risks that insurers absorb. Imagine the cost of an auto loan if the bank couldn't recover from wrecked vehicles. They would have to charge interest sufficient to cover the risk of a car crash destroying their collateral.