Yes, because their business profited from that. It's an example in favour of GPL licenses: the interests of the public and of a for-profit venture aligned to produce value for both.
So capitalism functioned how it should, and a company wasn't a greedy douchebag. Still seems commendable to me. They had a choice. Their choice was to do what most companies do, and ignore barely-enforceable licensing; or to give back. They chose the better route.
Is Valve still just a company with profit as its main motive? Yeah, that's the point. But it can do helpful things as a side-effect.