Swapping out the persistence layer in prod vs dev is one of the topics covered by the article, for the reasons you mention.
> Or perhaps you want to use a managed PostgreSQL database in production but run PostgreSQL locally in a container for development.
It’s mentioned in passing with no discussion of why you should not run your database in docker compose - a very common use case - so the reasons I mentioned were not explicitly discussed.