For one, to use the same tool in local development and in production. For another, because docker-compose is simpler than Kubernetes.
Why not use Kubernetes for local dev (kind or minikube) instead of trying to make docker compose hacks for production? Docker Swarm is rarely seen, I suspect industry has already settled on k8s as the standard