Here's my take on the Semi/Roadster event.
1) Good PR
2) Need to do it at some point (particularly for Semi; Roadster could have waited)
... but above all
3) An easy, no-short-term-risk, no-dilution cash raise. "Hey everyone! Start throwing cash at us in units of $50k and $250k!"

A couple hundred million dollars extends the time they can stay afloat while working to get Model 3 not just in full production, but turning healthy margins that can fund their other projects (including Semi and Roadster)