I dont see why they would need to create the marketplace themselves. Why couldn't they just let users convert purchased titles back into keys and then sell them on tons of third party key sellers that already exist?
... but they could also offer the option of doing that, but alternatively just letting you transact the game to another Steam user directly, using the in-store currency (with an x% shaved off the top) for the cost of Steam basically working as an escrow service (to guarantee you haven't done something like converted to a key and then sold that key twice).
If doing so is fully compliant with the law, I predict that's what they would do (and it's probably worth the cost to them to pay the lawyers to argue that's fully compliant... ;) ).
I wonder what the highest x% is that the courts would accept as not totally bs. I'm pretty sure if Steam said, oh yeah, you can re-sell within Steam but we'll just take 99% lol, that would not be ok.