Yeah, if you got an extra copy of HL2 or any game then Steam will allow you to gift the game to someone else's account (or if you buy a game on Steam you can tell Steam that you want to gift it to someone else). But if it's already on your account and you want to sell that, then it is against Steam's TOS, and therefore against OCN's TOS since it's illegal.
That said, people do it all the time. Not on OCN though, since it's not allowed.