No, Apple did not make a mistake.
Apple would have led Tesla to failure.
Apple philosophy is at the exact opposite of Tesla. Tesla is 100% about innovation and don’t care about finishes.
Apple is 100% about polishing.
Apple is good at taking an already mature product, and making available to a greater audience (smartphone, tablets, MP3 players). They are never the first, or even the second or the third on a market.
Electric cars were not mature enough for Apple.
They will be in a few years (and then Apple will release an electric car).
Apple can’t create an innovative product from scratch. They need dozen of products already on the market to take inspiration from. They are good at perfecting what is available, while taking as little risks as possible.