When BillG ran Microsoft, he was a total asshole. Now he's trying to be remembered in a positive light, but he's still thin skinned when it comes to competition.
I really doubt that he's doing that to create a better legacy. It's just that people at his level can do whatever they like, absolutely anything. So some are buying Hawaii islands and others try and help other people. Gates is one of the latter.