Activation lock comes up during the setup of the iPhone and doesn't appear straight away after the factory reset. Activation lock comes up after choosing language, connecting wi-fi and activating the iPhone.
Activation Lock occurs when someone has restored the phone to factory settings via Recovery Mode as all other factory resets require you to turn off find my iPhone prior to the factory reset which stops activation lock form occurring.
As most people who purchase 2nd hand devices are not aware of Activation Lock, they don't know about the requirement for the Apple ID and password and so do not ask about them prior to purchasing the device.
I have seen activation lock removal via POP submission to AppleCare multiple times over the last 6+ months in Singapore, Japan, China, Korea, India, UK, Australia, New Zealand, Phillipines, Vietnam, Malaysia, Indonesia, Vietnam and many more countries.