Its about steam itself not what valve does in CS or TF2 and the market isn't their fault.
The loot boxes are entirely cosmetical stuff and the market is 100% player run, when nobody buys the stuff, steam wouldn't loose a penny, they profit from transactions on their platform, but that's because they are acting as payment processors.