They started with Proton after Microsoft suddenly made a move with the Windows store and also started bolting down Windows a bit. As with most things Microsoft that initiative quietly died over time. But at that time Valve probably couldn't afford to take any chances. It probably also made them realize they had build a castle on someone elses land.
If you are making money in the amounts Valve is, then even the simplest risk analyses is going to show that "Microsoft rug pulling you" is one of your few existential threats. Even though the probability is low or medium-ish at best, the impact is massive. Even anti-trust isn't going to save you. By the time Microsoft gets convicted, you are already dead. Just look at Netscape.
Yes you can buy games on GoG or Epic and play them on a steam deck or a steam machine. But it's juuuuust enough faff to be annoying enough, that you'd rather just get them on steam. I know people (and am a person) who have rebought games they already own so they are on steam, to make playing between steam deck and desktop more reliable.
It's the same with the steam controller. You _can_ use it with games outside of steam, but it's enough of a faff that you find yourself avoiding it.
It's incredibly effective, and why they are an effective monopoly in PC gaming.
/s
Valve understands that inextricably tying themselves to Windows is a long-term death sentence. SteamOS represents a lifeboat for when Microsoft goes full iOS and decides to lock down Windows in exchange for taking 30% of all software purchases. Valve has been taking this threat seriously since at least 2010, which is why they've been investing in Linux gaming. Both Steam Deck and the Steam Machine are further steps toward complete independence from Microsoft.