It does. "Erase all content and settings" prompts the user to enter their password to disable Find My iPhone, and if you do it through iTunes, once the phone reboots into the clean OS it prompts on the computer to type the credentials in. You could refuse to type the credentials in leaving it locked, but Apple is pretty informative throughout the process. (You can also remove it from Find My iPhone on the web and it unlocks the device even if you don't have it anymore)