This is an excellent point.
Bill Gates has money because he created a product that set back science for decades. It still hurts science today. The way Windows differentiates itself from Unix for the sole reason of not being compatible has set back society immensely.
Today, after having made all this money exploiting society in general and science in particular, he is putting money back into science.
Look, I get it, the damage is already done, so him putting money back we gain some back. And I also get it. If he didn't do it someone else would have.
But does that absolve the sins of the individual?