Of course, such an operation would typically be done by a hedge fund or private equity firm. But guess who is responsible the one of the world's largest hedge funds [1] with $200B+ AUM...
Apple makes long-term, informed decisions. Buying Tesla then and now is a pretty tough argument to make.
Nevertheless, with the benefit of hindsight, it was likely the wrong decision from both a financial and strategic viewpoint. It's the kind of wrong decision Mark Zuckerberg avoided when Facebook bought Instagram and WhatsApp (despite being ridiculed at the time). Over the next decade, Tesla will likely be one of the most serious threats to Apple's dominance in high-end consumer tech goods (the other being companies working on AR/VR).
An increase in the stock price has little to do with the success of the actual business. Tesla hasn't gotten 600% better at being a car company. So far, Apple would only benefit from a Tesla purchase by selling the stock--which would defeat the whole purpose of buying it in the first place (Apple is not a hedge fund).