Because Java's combination of performance, productivity, observability, and stability is unmatched. The average codebase lifetime of large, important server software is over a decade, so not only do you want the first three, but to get a good return on your investment, you also want the fourth (over time, different parts of the codebase will see more or less development, and you don't want to spend money on maintaining parts that you don't want to focus on). Now, it's true that the biggest Java shops, where new projects are regularly developed in Java, are traditional businesses like Apple, Amazon, Google, Netflix, Alibaba, Tencent, and other Fortune 500 companies -- companies that care a lot about the value (and cost) of the codebase not just in the moment but over time -- whereas smaller companies are more diversified in their language choice, but they, too, often adopt Java more as they grow.