And a GOOD Java dev will likely leave far more maintainable code than an AVERAGE Python dev.
Java programs are larger than those in other mainstream languages, just by dint of the verbosity of the language (and research backs this up; studies showing errors per LOC are consistent regardless of the language).
Ergo...
That being said, modern Java is quite terse (var, streams, default interfaces, and now records and pattern matching, etc.).
Also, Java’s “verbosity” is pretty much only a constant factor, and not even necessarily in terms of LOC, but width. What research also show is the benefits of static typing. Also, I am fairly sure there is some survivorship bias working in the background, where an ugly java version of a complex domain survived because the language’s great observability sort of kicking it into a working spaghetti code state, while other projects died a premature death.
I mean, in most cases it doesn't really matter what tech you choose as 1. Most products don't really need "massive scale" 2. It's more important to be proficient in the tech you pick rather than it being the "best tech ever". I mean Facebook still uses PHP no?