PHP deployments traditionally depend on the host OS's PHP version, installed extensions, and php.ini settings. Every server is a snowflake - different OPcache configs, different extension versions, different FPM pool settings. When something breaks in production, you cannot reproduce it locally because your Mac runs PHP 8.3 and the server runs 8.1.
Docker pins every layer: PHP version, extensions (compiled from source if needed), OPcache settings, and FPM pool configuration. The same image runs on your laptop, in CI, and in production.