Same thing as Andrew Carnegie: After the violent putting down of steel worker strikes, Carnegie was seen as the devil himself. He was so upset that this would be his legacy, Carnegie went about doing charitable work to change his image. You probably have a library he built within 50 miles of you, no matter where you live in the US.
Gates is doing the same thing. He does not want his legacy to be that of a businessman, but rather, that of a philanthropist.
[0] http://www.historyireland.com/20th-century-contemporary-hist...
Gates was born too early for immortality to be achievable. Could it be that he has come face to face with his mortality, and having enough money to get anything he wants in the word that is for sale, he is effectively buying a positive legacy to be remembered by, as that is the closest thing to immortality that is currently on the market?