Learn the functions of the FAT file system. The file erase function works with the file directory, and the format function completely erases all data.
To be more precise, you need to look at how these functions are implemented in the Arduino library.
If the file removal function cleared everything, there were no data recovery programs, data can be recovered even after multiple formatting, the recovery method by domain orientation, yes, it is very, very expensive, but it is quite possible ( on magnetic media)