When a support function is found to be more profitable than the primary business Sometimes in the course of pursuing its primary business, a company discovers an unexpected source of revenue.  It is particularly interesting in cases when a humble support function is found to be more profitable than the final product or service. 

For example, I was reading about a company which set up an aluminum smelter in a developing country.  Aluminum smelters require a lot of electricity, and since the power supply in this country was unreliable, they also had to build their own mini power station. 

They soon realized that the power they could generate from their power station was more valuable than the aluminum they could produce, so they shut down their aluminum smelter and made money from selling power! 

Are there other examples of this?  Is there a name for this, other than listening to the market and being responsive?  (I don't like the word "pivot" because that has the connotation of what entrepreneurs and startups do when their effort has failed and they're trying to put a brave face on it.) 

I am looking for more examples of joyful serendipity in business.
The Aerobie Sports company mostly makes odd-ball equipment for having a catch. But they made a coffee maker called the Aeropress as a side project and now it makes up more than half of their sales. 

The Woolworth Company (of five and dime fame) founded the Foot Locker shoe store as a side business and now it is the core-surviving brand of that corporation when the main Woolworth business was closed. 

Post it notes were a side business for 3M but now amount to \$1 billion in sales a year. But that's only about 3 percent of revenue. 

The Michelin Guide books were developed to help promote the sale of tires through encouraging road touring. It survives today and though the business might be a small fraction of the revenue produced by the tire business it has significant cultural influence and an independent life.