How ? Two reasons...
#1 9 times out of 10 when you "loose" a file of some kind, it's "operator error"
as in "I pushed the wrong button"
#2 Electric devices do malfunction, however, camera's place the photos on
an SD card, from which you download to a file in your computer and if the
SD card is a good card ( electronic devices do malfunction) you have
to deliberately delete those files to remove them from the card...or you
might do like some people and put a new OS in their computer and take
pictures without reformatting the card for W7 and when they do, they
loose all the files on the card (still "human error")
It sounds like you might have a little experimenting to do, as in taking some pictures of things that don't matter and repete the process till you find what caused the error so it won't happen again...or get a camera...