That is unprofessional behavior by the gate agent. It would perhaps be legitimate to ask if the name was correct, in case of some kind of error, but the gate agent should keep their thoughts about passengers and their names to themselves.
I doubt they would think it funny if a gate agent was named Tiffany and a customer remarked "so where do you dance?", or some equally rude comment on one of their names.
The mother of the little girl also wasn't thinking at the moment she chose the name, since it does seem like a choice which will burden the girl without any benefit.