Welll... it is like this .. the packages on the .iso file were current at the time the initial .iso file was made ... since that time many updates have been done. Those updated packages are available in the on-line repository, if you make that CD available (checked in the Software Center) then the package manager is going to look for that CD and all those old packages ...and the package manager can go berserk trying to reconcile - do a search on this forum as to how many times the advisement was that the CD/DVD avenue was enabled, and to disable it ! ...

As to what transpired that "apt-get install" failed to fetch until that option was enabled ... does not stand to reason ... Computers are finniky people ?

Perhaps you have not ran the command "sudo apt-get update" or the GUI equivalent in a while .. doing so syncs the system databases with the repository data base for what is available for update-to-be-installed. Maybe when you checked the CD/DVD box some file on the system was accessed to make a comparison ??
In working theory all that should have been needed was:
sudo apt-get update
sudo apt-get install testdisk
and the package manager should have gone to work and done it's thing -fetched and installed testdisk- ... no fuss, no muss.

I'll admit :
sometime I do not know, other times I wonder