Serious explanation here: she's teaching them the instinct of being alert around enclosure openings! For example, if these were wild cats living in a bush, they'd run the risk of a larger predator running up to the opening and grabbing one of them. The mother cat is also only bapping them lightly without claws, so those slaps are more of an annoyance meant to get the kittens' attention, and to teach them to keep their eyes out for potential threats.
also slapping him is fummny
This post encapsulates everyone on this site