I guess it depends where you are deploying and who is managing the deployment/infra. If it's a one person show, running on 1 server that you don't expect to be pulled from under you, you might be ok with installing the java that you need and using that to run the application. Although, you still need to answer the question of what will make sure your application survives server restart.
Docker is used in deployments usually to answer the same exact questions. Most cloud providers can give you a server with docker pre-installed, it's easy to get a docker-orchestrated environment (ECS, Kubernetese, to name a few). Servers are VMs today, unless you somehow have a dedicated machine, which is more expensive. Servers can be pulled from under you at any moment (even dedicated servers, stuff happens).
In this setup, docker answers the question of how fast can you get back into running your application? As fast as docker pull and docker run, if the host was suddenly upgraded from under you to a diff version of the OS, that's alright your app is fully prepackaged into an executable that has all it needs.
Changing the java version is a change within your app repo, trackable and easy, and does not affect the host, which is usually more difficult to upgrade. If a different team is doing the infra management, you are not dependent on them to have the time to upgrade the servers, you deploy as usual.
What will ensure that the app survives server crash/restart - docker orchestrator. You don't need to worry about that. No more supervisor install/configs.
If the app crashes, docker orchestrator will bring it up.
And ofc, if you use docker for both deployment and local env, you get very close to not having the "it-works-on-my-machine" case. (A.k.a you upgraded java locally and forgot to update the server or some such case).
In a nutshell, a couple reasons to deploy using docker.