Java (Oracle and not JavaScript) is typically one of two competing paradigms for enterprise servers. The other is windows, assuming that Java is always paired with some enterprise version of Linux. So though you can completely use Java on windows servers without any loss of utility or performance, in the setting that you were to use Java you would just likely use Linux as windows has a competing programing paradigm known as c#. Also the comparison here is rough and not meant to be lliteral 1 to 1 map of c# to Java.
That said the primary reason for Java is complete hardware abstraction and portability of programs. A side effect of this is easier scalability. New server hardware can come online and completely and automatically join existing server hardware in running Java.
Java is probably one of the most high level software languages there are. In that you can deal with primarily abstract computational notions with out dealing with often repetitive and frankly independent aspects of everyday computers in their present formats. Additionally this could be why Java has some following in academia. You can study the abstract computational problems instead of some standard publication which may go out of date. In theory some Java software will never be outdated or obsolete if correctly written.
Java as a trade off does have significant overhead. When you say c or c++, that doesn't necessarily describe it's performance as to some extent that is just a standard which describes the syntax of the language. What you may actually be thinking of is what it compiles to. Depending it can be portable executable or .exe for example or it can be microcontroller arm machine binary or a list of Opcode's ready to be read off by the processor.
Java does specify the performance because it only compiles to one thing. That is a set of codes which the Java virtual machine executes (which in turn is executed by the stuff c would produce). This is how Java gets its portability. The JVM acts as a socket or adapter from one interface to another. Therefore one person need develop the JVM for the particular machine and that's it. You can see it's high priority for Java to improve performance of its JVM's. But even still for example in c and low to hardware, you can switch out costly trig functions to rough approximation by multiplication of a constant. In for loops etc calling trig functions this might be permissible in c while rendering a Java application utterly impossible.
Finally as to mining, Java key aspect is scalability. Software in Java can easily and very neatly be written to detect say new network additions and start scheduling work for them. So you can take any computer and as long as it has a JVM, it is now part of the pool simply by starting the same Java app that everyone else is running. I'm not sure you can get this aspect as easily with c. This is partly because windows has a different philosophy on hardware OEMs partly motivated by profits and a business environment, however you can see the good it has done in its own right by the excellent diversity of windows PC hardware while still typically retaining top performance to alternatives.
Again. Though Java allows enterprise to easily gain the server power they need and minimizing headaches. Sometimes the headaches are necessary to learn but sometimes it's not what's wanted.
In any case if you model the reduction in performance due to JVM overhead, you would have to compare that to longer down time or time in bringing up new hardware. If it took you a week to get a new minor up on say windows in c, and you could of had it up in 5 miinutes on Linux distribution with Java JVM you may be losing money short term. If the mining hardware had short life span that too could improve the cause for Java. It's some what to iot and using o.s. or not. You may get better performance with your custom servo controller but if a raspberry pi gets it up and running with Linux in 1 percent of the time, realistically after only a few projects testing prototypes you begin to devalue the bare bones solution.