I accidentally removed a xubuntu live usb from the computer while it was running but it seems to be working just fine. I can even launch applications that werent already open.

Is that expected? I have always thought you need to be careful to avoid bumping the usb drive or otherwise disturbing it.

Where is everything being stored? In RAM? Is the whole contents of the usb copied into RAM or just some parts?

Edit: tried it with manjaro and it fell apart. All kinds of never before seen errors. Replacing the usb didnt fix it. Couldnt even shut down the machine, had to hard power off.