Anti-capitalist government regulations and policies distorted market signals resulting in ‘overinvestment’ in the government regulated the housing market.
Government policies and regulation in the market distorted market signals from what they would have been under a free-market resulting in ‘overinvestment’ in the housing market (and related industries);
These anti-capitalist government monetary and tax policies that included:
Government (central bank) inflationary “low interest” policies: Central government bank (FED) “easy money” inflationary policies resulted in below free-market (natural) interest rates, which provided the fuel for above-market speculation.
Tax policy favoring housing sector: Tax exemptions favored investing in the housing sector. This distortion caused money to move out of sectors that did not receive the tax exemptions, i.e., “If I make money by investing in housing I pay no taxes, whereas if I invest money in a private hospital, for-profit low-cost school, or a new drug to cure AIDS I will pay taxes on it.”
The “easy money” combined with a tax policy that favored investing in housing pushed up housing prices artificially (above what they would be under free-market conditions), making new housing projects appear more potentially profitable than they would be in actuality (on a free-market).
Compounding the situation were government housing policies and bank regulations:
Government created, backed, and regulated mortgage agencies, private only in name, that repurchased bad loans: Government-created and backed agencies Fannie Mae (Federal National Mortgage Association) and Freddie Mac (Federal Home Loan Mortgage Corporation), which bought high risk, unsustainable “affordable” loans which would not have been obtainable on a free-market without their presence.  This policy rewarded mortgage agencies for making loans, which no rational mortgage seller would make if they were lending their own money, as they could resell these “sub-prime” and similar mortgages to the quasi-government institutions.
Government “moral hazard” policies: “Too Big To Fail” bailouts of politically favored “crony” banks by the government which rewarded irrational, risky investments that under a free-market would not be taken, i.e., if I win I keep my profits; if I lose the government will cover my losses.
Under a free-market, there are no central banks (but free-banking under a rule of objective law) to inflate the money supply (create credit backed by air) and artificially low interest rates (rates lower then the “natural rate” in a free-market based on actual supply and demand conditions of money backed by assets, i.e., real wealth); no tax or regulatory policies that favor some industries over others; no government-created mortgage companies to purchase bad loans, and no bailouts of bankrupt businesses by tax-payers (it is survival of the honest).
Once the “easy money” tap was closed (as the government cannot inflate forever) and interest rates rose, these risky investments were shown to be unprofitable, leading to a “crash” in the housing market, and the other industries (banks) that based their business on such markets.
The 2008 Financial Crisis was caused not by the free-market, but by government intervention in the marketplace. 
 Fannie Mae (Federal National Mortgage Association, created by congress in 1938) and Freddie Mac (Federal Home Loan Mortgage Corporation, created by congress in 1970) purchase mortgages from lenders and either hold these mortgages or repackage the loans into mortgage-backed securities (MBS) that are sold to other investors. The repurchase of these mortgages allows the original creators of the mortgages to create even more mortgages.
 Observe that fiscally sound, honest banks, like BB&T, which did not enter the “subprime” market, still remained profitable during the crisis (but were forced to accept confiscatory “bailouts” to keep up the pretense that the bank industry and “free-market” failed, when in fact it was government intervention in the market that was the fundamental cause of the problem.)
Former BB&T CEO John Allison speaks about the financial crisis of 2008-2009.
- The Financial Crisis and the Free Market Cure By John Allison