I thought it would be against Valve's Terms of Service Agreement that you can't transfer the account. I don't it's "illegal."
But if you search the forum, you will read a bunch of topics about people getting scammed on ebay when they sell various game accounts. All the buyer has to say is that they did not receive the product (account info that they bought), then paypal does its thing, and the seller gets screwed out of his money, while the buyer profits.