We do understand, what a bizarre comment.
However, in this instance a well known cousin apparently has managed to stay under the radar/ not abuse his own children, his grandchildren, his cousin's children (such as OP), all of whom he has had plentiful access and opportunities to groom.
He would suddenly be unable to resist his urges in the 2 or 3 minutes that he was requested to accompany the OP's child in a busy public place at a family event.
He maybe considered it his best opportunity to take advantage in a busy restaurant full of the public and family members who could, and some likely did, walk into the restaurant toilet during that period.
He's not a stranger at a public toilet that if walked in on could escape before being caught. It was the early part of a large family celebration where he would be easily identified.
I assume it was busy because OP didn't keep her child with her (as safer to remain seated with the family group) and didn't notice he was missing from the table.
Instead it was more likely that well-known cousin would simply comply with the request and return the child unharmed - as happened.
We don't know why grandma asked him, but she did what many of us would have thought not ideal, but not a big deal to make a huge drama about.
We also don't know why OP didn't ensure she had taken her child to the toilet before she left him. That's what most of us experienced parents probably would have done, but OP and her mum used their own judgement to a different end. There was no harm done and hopefully they'll both approach a similar situation differently in future.