OP has a perfectly reasonable and fair complaint. There is no way to know that these thieves guild items are critical to completing the related events before the fact, unless you stumble upon that information on threads/wikis. What's more, the thieves guild items do not behave like critical quest items, and when they are sold, unless you buy them back shortly thereafter, they disappear from the merchant's stock forever.
+1
Unless your main focus is thievery and you start the thieves' guild right after starting the game, the armor isn't that special. I wouldn't have thought it was any different than Apprentice Robes or whatever it is you get when you start in the Mage Guild. It certainly doesn't jump out as, "Hey, never sell this because this is completely essential."
For everyone saying that they hold onto everything that can turn into something, that's pretty much half of the gear that isn't completely vanilla and standard-issue. If you kill a boss and get a Staff of Reaping that has a Soul Trap spell on it, it's probably just a plain staff. But there's really no reason why it couldn't be the trophy you need for some side-quest for someone. So either you're not selling any enchanted item that you get or you run the risk of dead-ending a quest some time in the future... unless, of course, you make quest items non-droppable. I've been carrying around some drum for the past week because apparently it's something you need for I'm guessing a bard quest. Ditto some book, a song book I think.
And once you've created a system whereby quest items are non-droppable and non-sellable, it's perfectly reasonable to be upset if you find out that you've sold something that you later need to finish one.
Don't hate on the OP. He has a legitimate gripe.