The truth is the system actually writes a new data over the sectors that have the contains the file. This means that the file can still be recovered. When you go for file recovery programs, you can find that they can scan the hard drives for deleted files and then restore them. When the file is overwritten then the file recovery program is able to recover only part of that data. What you have to remember as well is that this will not typically apply to solid-state drives or SSDs.