I presume it's to lock your helmet to the bike, rather than to lock the bike itself.
Still if you think cyclings so dangerous you have to wear a helmet why are you even thinking of taking it off while you get a coffee? Lethal.
It's to lock your bike up at the cafe using your helmet.
It's to lock your bike up at the cafe using your helmet.