Because Java is taught to kids as their first language in high school and college. It’s associated with homework, exams, and boring corporate jobs.
Wait, am I sounding shocked, wounded and bitter again?
"This thing is so enterprise-y that the documentation alone can send email."
It's not a boring language, but it is often used in enterprise which gives it a bad reputation.
Edit: apparently some people think I am disagreeing with the statement in and of itself. Yes, Java is a homework language, but it’s real problems are far worse than that. Worst of all is the generation of developers that it produced.
Care to expand on that? Interested to hear more of what kind of developer you're thinking of.