The AIG bailout was emergency spending to prevent economic collapse. It wasn't an ongoing policy initiative. You can argue over whether it's effective or efficient but it's not anything like the cancer budget. That's like saying that, because of the aid after Katrina, building housing and infrastructure on the Gulf Coast is a policy priority.
Yes, there are ways the government could have mitigated or prevented both of these disasters (funding upgrades to the New Orleans levee system, doing a better job at regulating the finance industry, not encouraging homeownership), but you can't compare priorities by comparing emergency spending to ordinary spending. Remember, Congress is incompetent, not evil. They probably didn't anticipate that trillion dollar bailouts would be part of the cost of their policies.