Because you want to save uncommitted changes for recovery, image creation, or general inspection.
Stopped containers can be restarted by the command docker start <container-name>and can be viewed usingdocker ps -a
In addition, you can commit the changes for any container (even if the container is stopped) in the local registry using docker commit <container-name> <repository>:<tag>
source
share