I would guess that Bill Gates has been looking to do this for a while now, and this is just a good time PR-wise. It won't tank the stock anymore than it already has because the market's crashing, and people have other stuff to worry about.
I didn't in fact even know he still had a role in Microsoft. My understanding was first Ballmer and then Nadella took over running the show years ago. So I don't think it's not even going to to affect investor sentiment that much.
He could also care about whether his actions have a negative impact on others.