Theoretically, insurance is supposed to work like mortgage or other deaspool, where people pool money to cover a low chance but big risks by paying a small amount.
However it got broken the moment it got capitalist. There is a whole idea of maximizing gain and doing essentially what is investment banking in some countries.
Like, in 1681 when the "Insurance Office for Houses" was founded, or did you mean the maritime loans from the 4th century BC? Insurance and mutual aid societies have coexisted for literally millenia now, and if you think the latter are better, you're still free to join one (assuming your government doesn't force you into the former). But it's pretty nonsensical to blame capitalism if you don't like the way your insurance company currently operates.