Insurance companies can and do make money, but it is not from underwriting.
I know insurers make money somehow, and I presume it's on investment of the money (like banks, which also make money by taking your money and paying you interest of 1-5%).
So I guess it's like a bank? and the payouts for damages are like the interest paid to people for their deposits? And in the end you can pay out more than you take in, but make money investing the cash flow because you hold the money for a time before paying it back out?