They do, though its called "docker layers"
I have seen layers that were:
base
add tools
add source code
compile
delete source code
delete extra tools
(ship - why is the docker image so large? Oh well, storage is cheap...)
And there are easy ways to resolve this such as multi stage builds ( https://docs.docker.com/build/building/multi-stage/ ) - but mistakes still happen from time to time when people aren't aware that the current view of the docker image contains all of the previous layers too.