Obviously just speculating, but I would imagine a mitigating factor was that Elon and Unsworth were already involved in a public spat before the tweet in question.
I think if you tell someone to sodomize themselves with a submarine, you may get called names in return. To then run to the courts demanding $190 million in damages is a bit of a stretch.
Another factor could be that Musk was persuasive in convincing the jury that he wasn’t asserting a fact that he knew was false in that tweet, but an insulting colloquialism, which would not meet the definition of defamation (as I understand it - and IANAL).
Ultimately how you evaluate the result is in the eye of the beholder.
It does seem to me that Musk has learned from this, and there’s been a notable lack of controversy in his Twitter feed over the last several months.