You prefer not to leave your precious helmet unattended next to your bike. But to buy a top case just for that, that is just a bridge too far. Keep it with you then? To walk back to that terrace afterwards where you left it under your chair, or curse because you bumped into something with it.
Dragging your helmet along all the time, there are other options. Especially more practical options. A helmet lock allows you to leave your helmet with your bike and guarantees with certainty that it will be there when you return.
A helmet lock is sturdy and compact, which makes it easy to store on the road. Of course, everything can be broken, but deterrence is also a form of security.