They care about making money. Their investments in Linux are their future insurance policy from Microsoft, as unlike Sony or Nintendo, Valve only own the storefront but not the platform on which their games would run, and with Windows being their biggest customer platform, makes their survival completely dependent on the mercy of Microsoft and the potential dystopian scenario where, for example, on Windows 12, 13 or 14 you'll only be able to install apps through the official Microsoft store.
Linux compatibility was their only ticket out. It's purely a business decision, not a benevolent one.
Not knocking them for it, but it's good to keep in mind the reality and not blindly worship a for-profit corporation.