system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5:Why do computers insist that we "safely" eject USB drives?
gpt
Imagine that you worked in a filing facility - Your job is to take documents provided by various places and store them in your facility.

Since you can't be there 24/7, you have a "work area" which consists of a desk where people can drop files off. When people have a document for you to file away, they leave it on this desk, and then when you see it you take it and place it back in storage.

However, frequently people need to one: Get their document back, and two: Make changes and then send the file back to storage. This process is quite slow though: The person first has to leave a 'document request' form on the desk telling you what document they need. Then, when you come in and see it, you have to go back into storage, find the document, and leave it on the desk for them. Then they can take the document, make changes, and leave it back on the desk for you to find and store away again.

The above isn't a huge problem if it's only a few documents, but you quickly find that *lots* of your customers are grabbing the *same document* over and over again, only to make a small change and put it back. This seems like a waste of time to you, because you end-up going to get the document from storage over and over again when-ever they need it. Thus, to remedy the problem, you add a 'fast-access' area to your desk, where you leave the most commonly or recently edited documents from each customer. That way, when a customer needs that document, they can just grab it right from there without having to go back into storage to get it. This all works fine to speed things up, and everybodies happy that the time to get a lot of their most recently used documents has gone from a day to instant access.

But then a problem happens: The storage facility you're using decided to pack-up and move to a different location. It's not a huge problem, you just open a location for people to go and get their documents over there instead. However, some of your customers start complaining that you don't have all their documents. When you think about it, when the storage facility moved you never took all of the documents in the 'fast-access' area! Thus, you lost all those documents. To remedy the situation, you decide that the facility owner has to 'notify' you if they're going to move so you have time to move all of the documents in the 'fast-access' area into storage to prepare for the move.

The above is basically how the OS handles your USB drive (the storage facility). USB drive access is fairly slow, with portable hard-drives even slower. To try and speed things up, the OS realizes that you have a few files that you either just edited, or are frequently editing, and keeps those files in memory (fast-access) instead of constantly writing it to your USB drive (which is slow). The problem is that if you remove your USB drive (move the storage facility), you lose the file's currently stored in memory unless you (the storage facility owner) notify the OS (the person handling the storage facility) that you're about to move the USB drive somewhere else.