As part of a deal with the Securities and Exchange Commission, Tesla CEO Elon Musk will step down as Tesla’s chairman (but remain CEO) and both he and Tesla each will pay the SEC $20 million.  On Thursday, the SEC charged  the Tesla CEO with securities fraud for his “misleading tweets,” specifically one on August 7 that read, “Am considering taking Tesla private at $420. Funding secured.”

But the SEC settlement hasn’t settled questions raised about Musk’s erratic behavior or the consequences it could have on his high-flying tech brand.  Tesla is on the verge of finally making a profit, but Musk’s uncontrollable tweeting may undermine investor confidence and handicap the company from raising more capital in the future.

For months, Musk has snapped at reporters, mocked analysts and turned his Twitter account into a spectacle, as if he were the Donald Trump of Silicon Valley.

In July, Musk called out CNBC for being “relentlessly negative” about Tesla and calling its most recent article about Tesla “bogus.”

He slammed Business Insider reporter Linette Lopez for publishing “several false articles about Tesla,” and tweeted her asking, “Is it possible you’re serving as an inside trading source for one of Tesla’s biggest short-sellers? An ex-Tesla employee just went on record formally claiming you bribed him & he sent you valuable Tesla IP in exchange. Is this true?”

In Tesla’s Q1 2018 earnings call, the BBC reported Musk as tiring quickly of questions from financial analysts, finally shutting them down with, “Boring bonehead questions are not cool. Next. We’re going to go to YouTube. Sorry, these questions are so dry. They’re killing me.”

In a now-deleted tweet, Musk called one of the British divers who saved the 12 Thai boys stuck in a cave a “pedo,” after the diver said Musk’s offer to help rescue the boys was a “PR stunt.”

Granted, Musk has endured enormous pressure from investors and the media all year as Tesla raced to sort out supply chain problems and ramp up production of the Model 3.

All spring and summer, Musk ad Tesla pushed themselves to the limit to meet the production goal for the Model 3 by the second quarter. Tesla hit the goal, the stock price skyrocketed, and many analysts started predicting Tesla would soon — and finally — turn a profit.

But some experts think Musk’s inflammatory tweeting may counteract how far the company has come.

Musk detailed his plan to take Tesla private in a blog post published the same day as his tweet, verifying his seriousness about the plan but adding that “a final decision has not yet been made.”

Since that announcement, Tesla’s stock has gradually declined. Since the SEC announced its lawsuit, the stock has dropped 12 percent to $268.71 per share.

Three weeks later, Musk changed his mind. Tesla would remain public. According to CBS News, Musk’s tweet about taking Tesla private “erased $12 billion of the company’s value” to date.

Lawrence Greenberg, an adjunct professor of law at American University and a former Tesla stockholder, told InsideSources in an interview that he doesn’t believe the lawsuit will affect Tesla’s sales, but could have other consequences.

“If they do need to raise money [again in the future], this could be a distraction and unhelpful,” Greenberg said. “For people who are interested in holding for a very long time, assuming Tesla can achieve profitability, this could be just a bump in the road.”

Musk prides himself on his reputation for irreverence and it’s entirely possible he was joking around. In fact, the SEC complaint even claims he chose the $420 per share number as a marijuana joke to impress his girlfriend.

But even if it was intended as internet humor, Musk could still liable under the Securities Exchange Act of 1934.

“In order to violate the law, the statements have to be made in connection with the sale or purchase of a security, materially false or misleading, or omit something to make them false or misleading,” Greenberg said. “[There needs to be] intent to deceive or recklessness about whether the statement is deceptive. In this case it seems that the SEC has said that these statements were false, and given that he didn’t actually have everything lined up when he said he did, the argument would be from his side, well the statements weren’t material, they were just nonsensical spouting.”

Furthermore, Musk’s Twitter account is often treated as a mouthpiece for real company announcements and updates that are corroborated by official company materials like earnings calls, SEC filings and press releases.

“I believe Tesla has said people should be looking to the kinds of announcements they make on Twitter, and if the company has indicated that these [tweets] are company statements, it makes it much harder to say, oh that’s just Elon, he spouts whatever comes to the front of his brain at any given time,” Greenberg said. “There is some risk here. On paper the SEC has a legitimate argument.”

Musk’s recklessness may not dampen sales, but could absolutely ruin Tesla’s chances of raising more capital in the future and maintaining investor confidence — which, if the company doesn’t turn a profit soon, could come back to bite him.

“Being the wild card has made him able to accomplish a lot of great things, but if you look at the dinosaurs, getting really big was a major survival strategy until it wasn’t,” Greenberg said. “I think if he’d known what was going to happen, he probably would have abstained from making that tweet.”

Follow Kate on Twitter