He actually did okay financially because both RedHat and VALinux gifted him shares during the dot-com bubble. Not "richest man in the world" rich, but "enough to be financially comfortable and not have to work" rich.
I think the bragging rights of having at least half the internet running on top of his software would count for quite a bit too. There are very few people on this planet who can boast that level of influence.
Not to mention, something like 90% of handsets, tablets, tv set boxes, ebook readers, etc. Almost everything not iOS is based on Linux (Android, Tizen, KaOS, Tivo, Roku, ChromeOS, Amazon's fire stuff, etc)