Python, JS and C/c++ are full of idiosyncrasies.
Java allows students to quickly get up and running and focus on the 'CS'.
That said, Python might be more practical for anything applied in school.
If you extend your consideration to build systems and other tooling, it's easy to see that students have a lot to overcome with Java as an intro language.
I think purpose-built languages like the HtDP languages or Logo are better choices. Students can get started with zero faff, learn the essential concepts, and move on.
Java is a fine choice for higher level courses, with students that are already capable programmers.
Yes - 'Logo' is a good choice for the most entry-level users, maybe for high schoolers who are taking CS as a 'required' part of the curriculum, but anything beyond that Java is fine.
I think Generics, Java9++ 'Modules', jar files and class files might be the idiosyncrasies to worry about.
That said, it's weird that in 2021 we don't have a universally 'basic' programming language that is essentially the 'vanilla' of programming.
Somewhere inside JS/Python/TS/Java/Dart I think is that 'basic vanilla' imperative language I think.
Java is the most in-demand technology in my home country, Estonia. Java also has around 800 open positions at any given time where I live now (Buenos Aires, Argentina). In fact, pretty much everywhere I've looked, Java is consistently one of the best ways to get a job simply because it has the most jobs available.
HN favourites like Go and Rust? I haven't yet found a city in Europe that would have more than 10 job offerings for either of them.
However, the sausage is still made Java. Amazon, Google, and Apple are, as far as a I know, primarily Java shops. It's just no one ever starts a blog with "Here's something cool I did in Java".
Outside of USA, a little digging I did via Glassdoor:
Buenos Aires, Argentina: - Rust: ~5 jobs - Go: ~3 jobs - Java: ~800 jobs
Lisbon, Portugal: - Rust: ~6 jobs - Go: ~30 jobs - Java: ~278 jobs
Barcelona, Spain: - Rust: ~1 job - Go: ~50 jobs - Java: ~751 jobs
These are just places I've lived at and while I can see Go slowly becoming a thing, Rust is still half a decade away from anything tangible for the real world I would say. So if anyone asks me what should they become an expert in for the next 10 years, I would not hesitate to say Java.
Additionally, pretty much all the distributed data processing tools run on the JVM, which is a big deal if that's what you do for a living.