OpenJDK's GCs do have elaborate mechanisms to support mutation, but if they're unused they impose no extra overhead.
It's not a matter of some unique brilliance. Java is simply in such high demand that it has the sufficient resources to have state of the art optimising compilers and GCs.