Docker containers are running inside the virtual machine. Everything else is a consequence. Docker Desktop just tries to hide that fact from you so you don't need to setup a virtual machine and the client-server connection. Having a virtual machine is required on Windows and MacOS if you want to run Linux containers.