It was against the user agreement, so no one can say punishment isn't deserved. I do agree with some people who say Valve could of at least given some warnings out first, maybe punished those who continued to abuse the system but I honestly can't care either way. They are just hats, not like your getting money or even fame showered down on you from upon high.
I can also understand why they had to remove the items ill gained, word on the vine says they plan to put in a trading system and even give the option to add player chosen abilities to these hats and misc items. Idlers would then have a huge 'currency' to spend, all because they exploited a poorly designed system, and this isn't something that should be encouraged.
As for the system itself... it sucks on so many levels. While I understand rewarding people for playing the game I have to wonder who thought it would be a good idea to let a random number generator do it! I'm a jinx, it means no matter how bloody long I play the game I will never be rewarded for it.... I hate number generators. There are far better ways to offer a reward system that doesn't involve blind luck as a factor.
Time spent in game would be a good one, the way I envision it working is simple:
Every X amount of hours as a certain class will give you an class appropriate item to reward your dedication to that class. Maybe 10 hours, something fairly easy to get if you really like that class.
Then Y amount of hours as a class can give you a special item for that class, such as a hat or Misc time. Say every fifty hours you get this reward and given that more and more hats are becoming available it should take a good long while to collect them all.
You can even add a special item that is only achieved after Z amount of time. Say 100 or 200 hours as a class, something only a few people would obtain, to show that you have played the game for waaaaaay too long.
Also: All achievements achieved should give you a specific hat, only obtained through solving all the achievements, for this special occasion. Given of course you didn't cheat to get them all, however one would find a way to police that.
Rewarding the people who didn't cheat: Good... WE should get some recognition for the fact we have struggled against an unjust system! Wonder when they will go after the achievement servers though....
PS: 348.1 Hours played total... number of hats minus the halo: 0! What can I say, me and random number generators don't mix.