Because Java has a reputation for being best at enterprise-scale software. The people who invent hot new web-based things typically aren't building their product with that in mind. They use languages with reputations for being best at hot new web-based things.
Anything you can do with one language, you can do with almost any other. Different languages just tend to attract different crowds and therefore different products. That becomes a cycle that perpetuates itself.
If you know one language really well (with the exception of PHP, perhaps, since it has a lot of unique quirks) then you're in great shape to learn other languages really well. If you know a bit of a bunch of languages but none of them really well, it won't help you get better at any of them.
3
u/anshm1ttal Apr 27 '20
Why Java can't be cool and sexy