While Tesla faces a lot of challenges, investor and early Facebook employee Chamath Palihapitiya said the company's first-mover advantage in electric cars will give it a long-term advantage.

"There is a clear winner in electrification," Palihapitiya said in an interview Tuesday on CNBC. "It is done. That die has been cast. Now the question is: Can [CEO Elon Musk] build the infrastructure? If given time and given patience I believe that he will."

People are focusing too closely on the "window dressing" of Musk's behavior and not enough on the "main course," which is Tesla itself and its competitiveness in the marketplace, he said. He compared Tesla competitors, such as Audi's new electric offering, to the Zune media player, a failed Microsoft competitor to Apple's iPod.

"If you get caught up in all this stuff around the edges — he may mistweet from time to time," Palihapitiya said, alluding to Musk's tweets about Tesla production numbers and funding, which have gotten him in hot water with the Securities and Exchange Commission. "My point is, who cares? Your job as a smart investor is to separate the facts and the news from the fiction and the noise."

Palihapitiya said he continues to hold Tesla stock because Musk has been able to deliver on promises on a larger scale years down the line. Musk's misbehavior on Twitter and podcasts isn't important, he said, because demand for Tesla cars is strong and exceeds other players in the electric-car market.

"All of that stuff doesn't matter. It doesn't change the fact that tens of thousands of consumers are buying that car faster than they can get their hands on it. It doesn't change that as soon as you sit inside that car, your definition of what is expected is altered forever," he said.

"At the end of the day, whether you like his style or not, his substance is irrefutable," Palihapitiya said of Musk. "People are betting against his style. Betting against entrepreneurs who are changing the world has never been a profitable endeavor."

While Palihapitiya is taking a long view, Tesla investors have reacted poorly to the company's Q1 deliveries and earnings results. The company's shares are down more than 28% year to date.