I had a teacher in high school who I generally liked but who was some kind of uptight Mormon-offshoot religious and not very good at concealing his virulent homophobia.
I had a friend who was in the closet, due mostly to having fundamentalist parents. He was kind of an odd dude, not just because he was gay but because he was nerdy and socially awkward.
Anyhow, he was a year younger than me, so I wasn't around for this, but purportedly the teacher just took an instant dislike to him -- before he even had him as a student, he apparently badmouthed him in front of one of his other classes. Just weird, passive-aggressive hostility.
Telling kids to just act more butch is a milder version of the same problem. Some people are legitimately uncomfortable around students who are outliers in general and gay in particular. It's something that I believe will fade over the years, but obviously that's not something we should wait for; newspaper headlines shaming those attitudes are absolutely the correct approach here.