Although the Windows Store and Windows S have not been successful so far, Valve is still hedging their bets and trying to reduce their dependency on Windows and DirectX by promoting Linux and Vulkan.
Its obvious this is the long term plan for MS. Apple has already shown people will buy locked down systems.
Microsoft already followed the footsteps with Windows 10 S. And they're the first major OS that's taking advantage of Progressive Web Apps and adding them to their store, removing the need to build Windows-only software completely while still offering "native" experience: https://developer.microsoft.com/en-us/windows/pwa
I personally think that Microsoft learned their lessons with Windows 10 Mobile and that they're going to excel at being a competitor to Chromebooks.
I think the more plausible explanation is that Microsoft wrote the store because users expect to have one on mobile devices (i.e. Surface) and Windows 8 was an attempt at tablet-PC convergence.
At that point, they realised that if Microsoft is being stupid, there's nothing they can do against it. Almost their entire market is in the hand of Microsoft.
And yeah, it certainly didn't help that Windows 8 featured the Windows Store, therefore officially competed with Steam, and included a new application API (Metro Apps, now known as UWP), which I think back then was still exclusive to the Windows Store. Nowadays you technically can sideload them, but if we look at Android, that's still not much comfort.
Of course, I'd really really love if the gap closed enough that Windows became completely optional for gaming (and now, VR for me). My Windows 10 upgrade recently was purely to run my HTC Vive with DX12 - there's nothing else on that partition.
1. Microsoft doesn't license xbox software, so in that regard a Valve Box isn't a direct competitor.
2. Windows and Xbox (Entertainment) are separate business units, with different revenue targets.
3. Xbox is far from the market leader in the current console generation, and hampering Windows sales to boost Xbox won't make up the difference.
4. There doesn't exist a relationship that can't be forged by increasing the how much you pay. Said plainly: if you're willing to pay, Microsoft will do business with you (governments and legalities aside).
To the original question, why Valve does anything is a mystery. Speculating: This is laying foundations for streaming games as a service. Linux is their target platform for the game servers.
I don't believe this is about top-line revenue, as PC Master Race has overwhelmingly chosen Windows as it's OS, and it's not going to change.
Edit to Add:
Actually as I think about this more, the central motivation is even more simplistic: a group of valve employees wanted to make more games compatible on Linux. Their entire driving force is doing stuff they find interesting, as long as it benefits the customer. There exists Valve customers who can't play games, because they're not available on Linux. Thus, Valve is addressing it.
Valve has so much capital resources, they're not motivated at all by financial reasons.
The majority of the cost is actually borne by the studios/developers - compatibility testing and fixes - for little pay now (though possibly nontrivial one in the future). So it doubly makes sense for Valve
Valve needs to sell more games, and this is the easiest way to do it. They haven't completely given up on Steam Machines/OS, so better Steam play options just reinforces that freedom-from-MS initiative.
I think it makes sense in a couple of ways, especially considering how good Wine was getting, and the availability of good GPU drivers on Linux.
Also, it's nice because basically they've given this all back to the open source community, so it doubly reinforces "freedom-from-MS", because you aren't actually shackled to Steam either.
If you're a dev and want your game to run 20 years from now, as well as it does now, you'd have to think hard about picking DirectX or Metal vs Vulkan considering every game is or soon will be running on Vulkan through Wine/Proton.