Why a file can look saved before it is

When you copy a file to a USB drive, the operating system may first hold some of the data in memory rather than send it to the device immediately. This write cache lets the computer group small operations into fewer, more efficient transfers. The file window may show that the copy is finished even as data or file-system updates are still waiting to be written.

Those updates include more than the file’s contents. The drive also needs records that say where the file is stored and how its space is allocated. If removal interrupts the sequence, the file may be incomplete, or the drive’s directory information may no longer match what is actually on it. In serious cases, other files can become inaccessible until the drive is repaired; recovery is not always possible.

What “safely remove” actually does

Ejecting asks the operating system to finish pending writes and then detach the drive from normal use. That orderly shutdown gives the computer and the USB device a chance to complete their work before the connection disappears. It is especially important while copying, editing, or saving files, but a drive can still have queued changes after visible activity stops.

A USB device also has its own controller, which manages how data is stored on its memory chips. So the last visible moment of a copy is not always the moment every part of the save is secure. Safely removing the drive is a simple way to let both the computer and the device finish—and to avoid turning a routine unplug into a damaged file system.