Investors were caught off guard this week when Elon Musk announced Tesla (NASDAQ:TSLA) was cutting 9% of its workforce in a move dubbed as a "companywide restructuring." What hasn't received as much attention is that this looks like another move to slowly shut down Tesla's solar business.

Tesla has been shutting down its solar business since acquiring SolarCity for $2.6 billion in late 2016, and this could accelerate the former industry leader's demise. Installations, which peaked at 253 megawatts (MW) in the fourth quarter of 2015, fell to just 76 MW in the first quarter of 2018 and show no signs of recovering. Tesla may be using its layoff announcement to shrink the solar business further, which may have long-term consequences for the broader company.

Solar is under siege at Tesla

Musk said in a letter to employees that layoffs would "not affect our ability to reach Model 3 production targets in the coming months," work that's primarily being done at Gigafactory 1 in Nevada and its Fremont, California plant. If work at those two factories is picking up pace, but employees are being laid off, it stands to reason the solar side of the business will take the brunt of the layoffs.

As part of the announcement, Musk also said a deal with Home Depot would be discontinued only four months after it was launched. which will undoubtedly lead to reduced solar installations. Sales efforts will be moved to Tesla's retail showrooms, leveraging existing staff there, but showrooms haven't proven to be a good place to sell solar. Again, it looks like solar will be de-emphasized after this week's announcement.

Buying SolarCity could be a costly mistake

If it comes to it, shuttering Tesla's solar business wouldn't be a trivial matter for the company. Before being acquired by Tesla, SolarCity was given a $750 million subsidy by the state of New York to build the building now known as Gigafactory 2. But Tesla has to spend $5 billion in the state on solar manufacturing and installation-related activities to keep up its end of the bargain. Here's the detail from Tesla's Q1 2018 10-Q filing:

We have an agreement to spend or incur $5.00 billion in combined capital, operational expenses, costs of goods sold and other costs in the State of New York during the 10-year period following full production at Gigafactory 2. We anticipate meeting these obligations through our operations at Gigafactory 2 and other operations within the State of New York, and we do not believe that we face a significant risk of default.

Tesla didn't see default as a risk as of when that filing was made, but if its solar business is shrinking, it could be tough to spend $5 billion on solar activities in New York. Defaulting on the terms of the agreement would be costly for Tesla:

If we fail in any year over the course of the term of the agreement to meet these obligations, we would be obligated to pay a "program payment" of $41.2 million to the SUNY Foundation in such year. Any inability on our part to comply with the requirements of this agreement may result in the payment of significant amounts to the SUNY Foundation.

"Significant amounts" is vague, but it's fair to assume that Tesla would owe the state of New York millions of dollars for its lost investments if it shut down its solar business altogether.

Something is wrong with Tesla's solar business

If Tesla's solar business was going well, we would be seeing installations increase (not decrease), and Elon Musk would be touting new solar panels and solar roof tiles coming from Gigafactory 2. Instead, Tesla is announcing layoffs and continues to shrink its solar business, which should be a major concern to investors.

What's even more shocking is that competitors aren't seeing the same declines in solar as Tesla is. Sunrun and SunPower have actually used Tesla's weakness to grow their residential solar business and increase market share. The fact that Tesla is pulling back in solar indicates that something is wrong with the business. It could be underperforming sales channels, poor solar panel manufacturing, or problems producing the solar roof. Whatever the reason, investors should be concerned that continuing layoffs in Tesla's solar business could be extremely costly to the company long-term.