Energy innovation has been the stage on which many a financial farce has been performed. What can be learned from the fall of Abengoa, the Spanish energy engineering and construction company whose recent bankruptcy may trigger as much as $200 million in claims to sureties Liberty Mutual and Zurich over the contractor’s failure to complete work on an Oregon power plant? And what wisdom can be gained from the bankruptcy of energy developer SunEdison? The blame belongs squarely on too much debt and the illusion of financial vitality at companies propped up by government subsidies.

For years, Abengoa enjoyed a positive image as a renewable-energy pioneer and trumpeted its ranking in the ENR Top 250 International Contractors. Known for building the world’s largest parabolic-trough solar energy facility in Arizona, the company’s impressive solar-power and renewable-energy projects qualified for many government grants and credits. According to a study published last year on Goodjobsfirst.org, which says it promotes government accountability, Abengoa ranked at No. 15 on another list: the Top 100 Recipients of Federal Grants and Allocated Tax Credits Since 2000.

Most of Abengoa’s $605 million in grants and credits came from Section 1603 of the 2009 American Recovery and Reinvestment Act; this provision allowed companies to receive cash payments in lieu of tax credits for the installation of renewable-energy facilities. Under 1603, the U.S. has paid $23 billion.

Despite those credits, Abengoa’s huge debt—and its intricate methods of accounting for that debt—had put the company on some investors’ watch lists for possible trouble as early as 2014. So, the company’s Spanish insolvency and subsequent Chapter 15 bankruptcy in the U.S. wasn’t a complete surprise.

Debt and renewable-energy subsidies are also a part of the story at SunEdison, based in Maryland Heights, Mo. The company ranked at No. 13 on Goodjobsfirst.org’s list, with $650 million in grants or credits since 2000. But, alas, the company appears to have fallen into the familiar pattern of fast growth and too much debt. Today, last summer’s SunEdison share price, $30, is a distant memory.

According to National Review, the federal government handed subsidies to Abengoa and SunEdison management teams “in subsidy-dependent businesses that would never have grown to their current size had they not been able to binge on taxpayer cash.”

The irony in these failures is that, while the cost of energy is falling, public support for renewables is high. The U.S., China and India all plan to add hundreds of gigawatts of solar power in coming years. Government financial incentives no longer are needed to trigger the innovation; in fact, they should be scaled back to a minimum and subject to responsible financial management—or there will be more reckless expansion and crashes. Public demand will be enough to push renewable energy ahead.