Personally, I find the joke in poor taste. My real objection, though, is to your idea that "it's not like they're actually hurting the person, so it's ok to joke about"
Like, you'd never joke about cutting someone, but their hair is fair game because it's "dead tissue".
I'm saying that mindset isn't ok. Frankly, it's a bit offensive and it's why many of us with long hair get super protective of it.