Soooo, you added a file and then deleted it. OK so far. Then, as a result of adding a similarly named file, you were asked if you wanted to recover or purge the original file... and you chose purge... and the file was purged... and you're suprised by that behaviour.
A file that has been deleted may easily be purged from the database, preventing previous versions of the project from being rebuilt.
Create a project called A. To this project, add a file named 1.c. Optionally revise the file; then delete it from A. Add a different file called 1.c to A; you will be offered the choice to recover the file, or to purge it from the database. Choose not to recover the deleted file, but instead to add your new file. Display the history of the project, and attempt to Get a version of that project from before 1.c was deleted. You will find that the original version of 1.c is not available, and thus your project cannot be rebuilt.