I heard a story (from someone on here actually, don't remember who) of a kid pointing at someone on a train and saying "He's naughty! He drew on himself!". I thought that was adorable
I think a lot of the time people saying things like that THINK they're being friendly/funny. Even if they're not, I try to give them the benefit of the doubt. I also find that giving polite and reasonable responses often throws them off: eg. "I don't think that's a particularly vital lesson, but thanks for your concern", or if you're feeling more snarky "I haven't thought about it yet... but I'm thinking of ways to teach my child not to make rude comments to strangers".