In 99% of the cases a EAR file + JDBC connection is enough.
But people who use keycloak often have little idea what Java is. They write code in Go and call Keycloak interfaces via REST API. They just need to start that thing and connect to some database.
With docker they'll get it up and running in minutes.
With EAR they'll spend next few days I bet it.
This approach was way lighter weight than pushing enormous images around.