If you’ve got a limited hat that you pin to your profile and then sell/trade it you will be stuck with that item pinned and unable to remove it from your profile.
Keep in mind, some people have used this pin system a little differently as the people would use the pin system to show types of hats they have gotten over time and/or even traded, but they still want people to know that they had it. (Just a different perspective since you included that it should automatically remove the pins as soon as you lose it)
I agree that it should allow you to unpin a pinned item though, as it is annoying if you traded it.
I do not disagree, I just wanted to give you a different perspective on it on what some people were doing. Myself, I just show off some of the hats I traded away that I was proud of achieving like the Clockwork headphones, Sparkletime fedoras, etc… that i’m not in possession of still. I do use it though to highlight hats that I still have like the Boss White Hat or REM16 hat