AIG failed due to AIG Financial Products, which sold overly-cheap high risk derivative Credit Default Swaps on mortgage-backed securities, not due to their core insurance business. CDSes are insurance of a sort against default risk, but they didn't involve actuaries, a real risk model for pricing, etc. All the other parts of AIG were actually doing quite well.