Actually, that was only a small part of the story. The primary cause of the S&L crisis was the steep decline in interest rates in the 1980s, coupled with Federal mortgage regulations that prohibit banks from charging fees to customers who wish to refinance their mortgages.
Back when interest rates were high in the early 1980s, you had lots of people locking in long-term rates of 12% or more on things like 5-year CDs. This was not a problem because banks were charging 16% or more on their mortgages. But when interest rates declined dramatically after that, everyone with a fixed-rate mortgage went out and refinanced for a much lower rate. So banks were basically screwed, because they were getting rates of around 8% on their loans but still had to pay out 12% on their long-term certificates of deposit. There's no way anyone could stay in business for long under those conditions.
The problem corrected itself as those long-term CDs reached maturity and the long-term interest rates paid out to customers were more in line with the lower long-term rates the banks were charging on their loans.
I know it's hard to have any sympathy for banks, but they basically operate under one very onerous condition in which every mortgage they underwrite is a fixed-rate mortgage when rates are rising (since customers will not refinance a mortgage to pay a higher rate) but a variable-rate mortgage when rates are falling (since customers can't be penalized for refinancing).
Other reasons for the S&L failure is in the name. When the gov't made it too easy for S&L's to do commercial loads there was a flood of "Banks" that converted to a Savings and Loan. Because they required less capital to write commercial loans they over did it and when the commercial market fell the S&L's quickly became distressed.