When Windows runs a program, it doesn't simply fully load the file into memory and hold onto it. It maps the file, then copies bits of it into RAM when they are actually needed. If your app is small, within a second or two everything it needed was already sitting in RAM. The file on disk had become irrelevant.
A format doesn't erase data - it just writes a fresh, empty index. The old bytes are still there, just unlisted. A real-life parallel with a library would be: you burned the library card catalogue, not the books.
So the app kept running from the copy already in memory. It got lucky in your particular case, though: if it had later needed a chunk of code it hadn't touched yet, it would have gone looking for a file that no longer had a home and crashed instantly. And anything it tried to save would have failed too.