Nothing, really. A lot of base-level bear pokémon (such as teddiursa, pancham, and—yes—cubchoo) are mischievous in nature and enjoy displaying affection through bizarre acts designed to catch their trainers off-guard. It sounds as if your cubchoo is particularly affectionate towards you, which is a good thing! Cubchoo can be difficult to get close to compared to their ursine cousins.
However, if you’d like for this behavior to stop (especially if it’s physically painful for you), it may be best to train him not to do this. Use positive reinforcement to teach him acceptable ways of showing affection, and avoid responding (even through shock) when he reverts to using this method instead.