Even if this is eyewash to flush out leakers... why spend the time doing this as the owner of the company? There seems to be a lot more important work they could be tackling on instead of being a meme lord to a bunch of 14 year olds.
In fairness, being a meme lord to a bunch of 14 year olds has been a big part of his playbook so far, and by some metrics it has worked a treat.
He has done this repeatedly in the past, at Tesla.
The IT department might have sent the email, not Elon himself...
Anybody competent in IT wouldn't be asking for screenshots of code. They'd know how to access the repos touched by a given user.
That wouldn't be relevant if it were for entrapment purposes, would it?
Currently some big portion of the company (maybe a third?) have decided to quit but haven’t been terminated yet, and are still receiving these all-company emails. They are not afraid of being fired by Elon.