A virtual environment is just a copy of the python and pip binaries. When you activate the venv, the venv dirs temporarily get added to your path, so your regular python alias points to the binary in the venv (run which python
with venv active to verify). Pip will install modules to a subdir of your venv.
It basically works like npm and the node_modules dir.
On second read, maybe you already knew that.