Here's the background. The UK forced the importation of opium into China, at massive profits to themselves and tremendous harm to China. They also demanded the concession of parcels of Chinese land where they weren't subject to Chinese law but instead could set up their own legal system. One of these concessions was of course Hong Kong.
When Hong Kong was eventually returned to China, the Chinese govt showed great tolerance and restraint in allowing Hong Kong to keep some autonomy and existing foreign systems including legal systems.
Meanwhile, Western agencies sought to create mischief in Hong Kong by boosting 'pro democracy' groups and all sorts of CIA backed NGOs. IOW, the usual pattern of setting up a 'colour revolution'. Such a revolution was then attempted in 2019 and failed because it was not truly hone grown.
The Chinese govt has cracked down since that attempt and imposed laws like the one we are discussing here. You, with your Western blinkers, may be blind to what prompted it and it may offend your Western ideals but tough luck. it's not actually your business and this guy was an idiot to wear an openly seditios logo on his clothing when such laws have been put in place.
Finally, on a personal note, I find ppl wearing political and ideological logos on their clothing an obnoxious practice that comes from the USA, and I can see how it would feel quite foreign to Asian cultures. Actually, I find wearing pictorial t-shirts in general very 'man childish' behaviour and again, very US American. I don't like that, under US influence, it's become a practice in my own country, although I wouldn't support a law against it (of course).
So no, I don't see this law and this prosecution 'insane' in the historical context of Hong Kong. I also see it as quite trivial. So again, I wonder why you chose to highlight this particular incident which heoowns to play right into the hands of the Western agencies pushing mischief in Hong Kong.
(btw, I tend to lean heavily towards the answer just being that you're a 'useful idiot')