Shorting allowed the banks to minimize risk and protect their investors. They might be sued for failing to do so.
Allowing Fannie/Freddie to issue $6.5 trillion of derivatives based on the mortgages they bought provided a market, backed by the taxpayer, for subprime mortgages. And, drove up the cost of housing to unrealistic limits.