Some applications cannot be deployed as a monolith. Maybe they mix native and managed dependencies. Maybe they rely on external software (like, say, ffmpeg) being present. Maybe this external software depends on specific system library versions.
Yes, you can make all of this work without containers. They make all this very easy and reliable though.
So your container has the right Java Runtime Environment and your app inside. I don't even need to know it's Java!