It's not a principled stance, it's simple economics.
They already take 30 percent of sales.
It is a benefit to them to put whatever will guarantee more sales, and a couple cents from an ad impression is just going to get in the way of that goal.
You're not thinking like a capitalist. That 30% of sales they're going to get anyway because the games that will pop up at the storefront are games that are, relatively speaking, successful. What they're not getting is the money other companies would pay them to advertise games nobody wants to see. From a capitalist point of view Valve is leaving money on the table by not selling ad space.
That assumes that the money from targeted/curated ads is less than the money from paid advertising fees + follow up sales. That may not actually be true. Generic ads are notoriously bad at converting views to clicks to sales. What steam is doing is basically targeted advertising which boosts their sales, where they make a guaranteed 30% return at a rate that's probably much higher than the conversion rate for paid advertising.
Other sales platforms do the same thing. It's not really any different from all the recommendation sections on Amazon. The idea that they're doing it just to be nice is pretty ridiculous. Valve is still out to make money at the end of the day.
This is where your thinking doesn't align with modern day Capitalists. You're thinking about the scenario where it might not make a profit, but the capitalists think about the scenario where it could make a profit. It's a question of potential. If there is potential to make even more money (and in this case there is) then that's a business case that needs to be explored. It ultimately doesn't matter if it actually makes them less money, the potential gains matter more.