Java is still great, same for PHP and they have only been getting better.
Java has been great for larger projects for a while, but I think smaller things like one-off scripts have been firmly out of reach so far.
It's good to see that change, as being able to use it in the small has obvious synergies.
why specifically?
Having to compile every time (or at least there not being a convenient wrapper that compiles and runs at once), the boilerplate of having to define a class and main method, exception handling, and most of all having to deal with Maven.
Other pointers are either opinionated or minor. From another hand, if dev has experience in Java, benefit of not learning some new language/ecosystem is kinda huge.