Perhaps there's a more benign explanation for the AIG bailout. It was quicker and more efficient to give the money to AIG and let them pay their failing counterparties (all those crooked investment banks holding the credit default swaps) than it was to negotiate a bailout for each counterparty separately.
The paperwork for a first round startup financing is so complex and expensive a lot of investors can't afford a deal below a few megabucks. Can you imagine the paperwork to bail out an investment bank, multiplied by dozens and dozens, that had to get done in a few days.
Once the govt and the fed had decided to intervene, they needed to get it done. This got it done.
I'm afraid this is a case where justice for a few hundred bad actors took a back seat to righteousness for the whole economy.