Most drive filesystems essentially have two parts: A hierarchical index and a bulk storage area. The index stores a small amount of file metadata (such as the file name, child index nodes, etc) as well as references to chunks of data in the bulk storage area which actually contains the file data.
Unless you go out of your way to do otherwise, when you delete a file, the data isn't actually purged from the bulk data storage area. The references to the data in the index are just deleted or marked as deleted. For all intents and purposes, the file was deleted, but the data is still on the drive, in "unallocated space." Every time data is written to the drive, there's a chance that some of the "deleted" file will get overwritten, but until it is, the file data is on the drive.
If you accidentally deleted all the data off of a drive in this manner (such as with a quick format, which just wipes the index and writes a new one) you could still recover a good amount of the data. Fragmented data would be nigh impossible to automatically recover after a quick format since the data isn't contiguous and the mapping was nuked when the index was wiped, though if you had known data patterns to search for (such as a few 512 byte chunks of illicit data) then you could trivially flag a drive for deeper forensic inspection. For small or unfragmented files, you can recover them in full.
Unless you go out of your way to do otherwise, when you delete a file, the data isn't actually purged from the bulk data storage area. The references to the data in the index are just deleted or marked as deleted. For all intents and purposes, the file was deleted, but the data is still on the drive, in "unallocated space." Every time data is written to the drive, there's a chance that some of the "deleted" file will get overwritten, but until it is, the file data is on the drive.
If you accidentally deleted all the data off of a drive in this manner (such as with a quick format, which just wipes the index and writes a new one) you could still recover a good amount of the data. Fragmented data would be nigh impossible to automatically recover after a quick format since the data isn't contiguous and the mapping was nuked when the index was wiped, though if you had known data patterns to search for (such as a few 512 byte chunks of illicit data) then you could trivially flag a drive for deeper forensic inspection. For small or unfragmented files, you can recover them in full.