Deleting a file removes its entry from the file system's index and marks the clusters it occupied as free. The bytes on the platter are untouched, and on NTFS the index entry itself often survives for a while too, which is why recently deleted files come back with their names and folders. Emptying the bin is the same operation one step later. A file deleted with Shift held down is the same again.
A quick format writes a fresh, empty index at the front of the drive and touches almost nothing else. The old index is overwritten, but the files are where they were, and on NTFS and HFS+ enough of the old structures usually survive elsewhere on the drive to put names back on most of them. A full format on Windows since Vista writes zeros across the whole drive, and there is very little to recover from that; a Mac's Erase with the security options set does the same. If a format took hours rather than seconds, it was probably the full kind, and we say so honestly at the free look.
The thing that turns any of this from a good job into a poor one is use. Every file written after the deletion or the format lands somewhere, and somewhere is space your old files still occupy. The bench images the drive once, without writing to it, and rebuilds the old file system on the image, recovering by name where the old structures survive and by content where they do not.