First, an example:
~ $ ls
~ $ mkdir foo; cd foo
foo $ pwd
/Users/person/foo
foo $ ls
foo $ touch file1 file2 file3
foo $ ls
file1 file2 file3
foo $ rm *
foo $ ls
foo $ rm -r ../foo
foo $ pwd
/Users/person/foo/
foo $ touch file4
touch: file4: No such file or directory
foo $
What happens when you delete the directory you are currently in? Why am I still in a directory that doesn’t exist (I assume it doesn’t exist solely because I cannot write into it)? I imagine it has something to do with a pointer of some sort.
Your shell process has that directory as its current directory, which keeps its inodes on disk allocated in much the same way as an open file keeps its inodes allocated after unlinking, until all processes holding an open handle to that file close them.