Factory Reset, Google Photo's recovered old photos
A factory reset deletes the files on your internal memory, but does not secure delete them - or delete anything on your internal SD card.

When you press "Factory reset", it quick formats /data/ and /cache/. If you select "Also erase the SD card", then the internal SD card will be erased too.

If they can still be found with Google Photos after selecting the option to erase the SD card during a factory reset, try going to Settings > Storage and then select "Erase SD card".

If you really want to fully erase everything, use a secure delete program (it will fill the internal memory with a file filled with 0's and then delete the file), so you can't recover deleted files.