Regardless of whatever Musk's intrinsic and learned intelligence is, it's quite clear he operates from intuition when tweeting- much like Trump (and many other users of twitter). He's going for the dopamine rush of seeing others praise him for what most people would interpret as jerkish behavior (and in his mind, clearly he believed this employee was "worthless" and "should have been fired" until he learned that the consequence of that would mean a very large payout.