>Is there a reason why game developers can't just sell a key on the web using Shopify/WooCommerce/etc. and distribute the game files publicly via a CDN?
It's not that easy; Steam brings down dramatically complexity of self distributing and it offers a plenty of Web 2.0 features e.g. reviews, discussions forum, connecting with friends, playing with friends, chatting with friends etc.
It's like asking why Amazon exists when sellers can have their own store page and distribution channel....
Some games that I know that are popular and not on Steam are for example Starsector and Escape from Tarkov. Game devs choose not to publish their game on Steam either because their game is not finished and they do not want to get negative reviewed to the ground and/or they think their game's brand is so strong that they do not want to pay 30% tax to Steam. For example Minecraft most likely wasn't on Steam because of aforementioned reasons.