Elon Musk just made another big bet on himself.

Over the last two days, Musk has bought 72,500 shares of Tesla, when shares were trading at $342 to $347, according to an SEC filing. The total purchase is worth about $24.9 million.

Tesla has an abundance of skeptics, but Musk has continued to fork over cash for shares in the electric-car maker. Back in early May, Musk bought 33,000 Tesla shares, then worth about $10 million. Shares were trading just below $300 at that point.

Musk is Tesla's largest shareholder. He now owns about 33.7 million shares of Tesla, a roughly 19 percent slice of all outstanding shares.

Tesla declined to comment beyond what was in the filing.

Musk made his purchases shortly after Tesla said it will cut about 9 percent of its workforce of 46,000 employees, in salaried roles outside vehicle production. The company is trying to improve efficiency and profitability as it continues the frequently delayed and often struggling production ramp of its Model 3 sedan.

The company is still burning through billions in cash and has faced challenges on several fronts, including labor disputes, executive departures and investigations into the role its Autopilot driver-assistance system has played in some high-profile crashes.

Despite Musk's apparent confidence, Tesla is the most shorted U.S. equity, with a $12.82 billion short exposure, according to financial analytics firm S3 Partners. That's 22 percent of all shares outstanding.

For comparison, Apple is the second most shorted U.S. stock, Amazon is third, and Netflix fourth.

But since June 1st, Tesla shares have risen 18 percent and short sellers have lost about $2 billion, S3 said.

Despite this, short sellers such as Jim Chanos of Kynikos Associates are still convinced Tesla has some fundamental problems achieving profitability.

"The basic problem is that he is making the cars at not enough of a gross margin to make money," he said on CNBC's "Closing Bell" on Wednesday. He added that Tesla may have an even tougher time making money on its cars as more competitors begin rolling out.

Tesla expects Model 3 margins to break even in the second quarter, and be positive in the third and fourth quarters. The company is still targeting a long-term gross margin of 25 percent on the car.