I think the outrageous thing here is that Xcode contains Java runtime.
I call it outrageous because the task itself (uploading to App Store Connect) don't require a separate runtime. It's likely an artefact from the past or convenience vehicle for whoever wrote it; another example of developer's convenience trumping user experience.
It would also be a download-on-first-use thing, much like Rosetta 2 or Xcode command line tools. Latest version only, updated regularly, updates delivered similarly to Safari Technology Preview. If you need a specific version, download it yourself.