When you delete the data you only update the bookkeeping, so that's much quicker.
If you were to erase the file then it would take just as long as writing it in the first place.
"Delete" in almost any computer context means "forget" not "erase." "Forget" the file metadata (generally the name, the link to the beginning of the chain of blocks on disk, etc.), "forget" the pointer to a block of memory, etc. Systems specifically designed for security may have additional provisions that turn those "forget" operations into "overwrite-and-forget," but in general simple forgetting is preferred for speed.
The contents of 48 byte disk with a 7 byte file allocation table (FAT):
[................................................]
FAT----DATA-------------------------------------
Write a file named "blah" with contents "abcdefghi": [blah.90abcdefghi................................]
FAT----DATA-------------------------------------
Notice that the FAT area contains the filename, a "9" representing the length of the file, and a "0" indicating the spot in the data area where the file begins. In fact, the file system might choose the put the data somewhere else, and that's absolutely fine. For example: [blah.95.....abcdefghi...........................]
FAT----DATA-------------------------------------
Represents the exact same contents with the file stored at an offset of 5. So say I want to delete this file now. A typical file system would do something like this: [.lah.95.....abcdefghi...........................]
FAT----DATA-------------------------------------
It writes a single NULL byte to the file system to mark the filename as empty, and the file is gone. None of the rest of the data is cleaned up.