Elon Musk has been vocal about his belief that the world needs to transition away from fossil fuels in order to combat climate change, and he sees Tesla as playing a key role in this transition. He has also stated that his ultimate goal is to help create a sustainable energy ecosystem, where clean energy is generated and stored locally, and then used to power homes, businesses, and vehicles.
In addition, there have been some hints from Elon Musk about the possibility of Tesla developing wind turbines as a source of renewable energy. This could be a natural extension of the company's current focus on solar and energy storage. It's possible that during the development of Tesla Semi or Tesla Bot, they could have used a motor as a generator and windmill turbine, that would be a surprise in the company's portfolio.