You have to consider that a poisonous/bigger snake could quite easily kill a small child, so instilling fear of snakes in a child is not a bad idea if you live around them.
And at the age when a toddler might potter about picking up things they fancy, they might not fully understand/remember being told, it has to be a memorable lesson!
I think it's something we in the UK can't really understand, but I lived in the middle east as a child and I remember my parents telling us horror stories about children who'd been stung by scorpions. We knew more than one person that'd happened to, and 20 years later I still check inside my shoes before I put them on.
Was it nice? No. Might it have saved me from being stung by a scorpion? Yes quite possibly.
Although all that said, the laughing at the child is a bit disturbing.