system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5:What happens in the background when you click on the 'Safe to remove hardware' button in Windows?

And is it important that one does that before ejecting a drive? I have seen people who just yank their USB drives off their CPU once they're done without 'safely removing it'. And that doesn't seem to harm the drive or the computer.

So what does that 'safe to remove button' really do?
gpt
The safe removal function instructs the operating system to wait for all processes accessing a filesystem to finish and then "dismounts" the filesystem, preventing further read/write operations.      If this step is not taken, there is potential for read/write operations that have not completed or are waiting to fail, which has the potential to cause data loss.