It determines the price. If you “self-publish” on a web shop or something with DRM free downloads, you have to price it the same as on Steam, otherwise Steam may delist you. So devs can’t get around the 30% fee by offering a discount on their store.
And… practically, if the storefronts are the same price, most will just buy on Steam.
There can be other complications related to scammers, but that’s not Valve’s fault. Supporting both also takes more dev effort.
Rimworld took this route, at least for some time. It started only self published via the Ludeon Store yet ended up mostly on Steam because that’s where all the attention and mods went. I have the game bought both places, oddly enough.