If you have find my iPhone turned on and you go into Settings > General > Reset and you Erase all Content and Settings, it will prompt you to enter your Apple ID password, by entering this password, you disable the find my iPhone feature. It is required when you factory reset.