The benefit of this approach is that you can manage the changes to these files via your favourite source code management system, e.g. Github.

My containerized databases have their data and logging disk volumes mapped into the container. Keeping the data & log files outwith the containers gives you lots of flexibility wrt. moving DBs between containers as well as backup strategies.