That's because it still counts as you making a transaction, even if its for what is legally a service or nothing. If you sold intangible and legally worthless widgets you'd still need to report to the IRS. Doesn't really matter what you're getting, since Steam$ is counted as a currency of some sort, so the IRS wants to know about it. The IRS is also not the legal system so that's a bit of a stretch regardless.
Legally, gambling for tokens is fine in a lot of places. Exchanging those tokens for money is the legal grey area. If its money->token->gambling->tokens the government is pretty unconcerned. Its when it goes money->token->gambling->tokens->money that it really becomes an issue. If the tokens have an actual defined value, or count as property legally, then valve can't say that their tokens aren't supposed to be sold for money. Right now, the Steam trade market is designed to prevent you from selling things for "real" money to prevent this. All you can do is put money in, and receive either steam currency (valued in real currency but NOT real currency itself) or tokens (skins)
Otherwise, valve would've never gotten this far without a lawsuit.