He used his wealth to benefit society, but he also effectively set up a system that would stamp and preserve his name and legacy in history. His actions weren't exactly entirely selfless.
This seems to be a common goal for a lot of people once they become very rich. They ask themselves, "what do I do with all this money?", and then they discover that even rich people die... So they attempt to white wash any of their past wrong-doings, and paint themselves as heroes and leave behind a legacy where their name will live on even after they die.