The World Wide Web was conceived as a way of linking together resources from computers all over the world into one seamless web. This means that programming for the web is a different experience from traditional programming. One aspect of this is that, since the web is designed to link together many different resources, it makes sense to use many different tools to create interactive web experiences for users. In some ways, this is forced on developers. Even a basic set of tools for web development would include some image editing software to prepare images for the page, in addition to some way of creating HTML pages (possibly just a basic text editor). Typically a developer would also want sound and video software and programming tools to add interaction.
This approach of using multiple languages often raises questions about maintenance. Using just one language supposedly makes it easier to maintain a site, since the maintainer, who will eventually be someone other than the developer, will have to master only one language. Furthermore, the maintainer will have to track new versions of only one language and will have fewer compatibility issues to worry about. This is a false savings, however. Using the right language for each task leads to simpler and more easily maintained code than stretching the abilities of one language to its fullest.
The real requirement is that we quit thinking of programmers as people who have mastered one language. No one would expect a plumber or a doctor to understand how to use just one tool. Both are expected to have mastered a range of tools and techniques to use when appropriate. In the same way, developers need to have mastery of a range of programming tools. Fortunately, my experience with undergraduate programmers is that they have picked up on this and are quite comfortable switching tools as needed.
This specialization of tools also has advantages for the non-expert. Some mathematicians enjoy programming, but not all. But even mathematicians who don't want to master Java or some other language may want to get some specific interaction into a class web site. It is much easier to learn just enough of the correct tool to accomplish a task than to master programming in Java or C or Perl or whatever language is currently popular. For many situations, I have found PHP to be the correct tool.