When you reset an iPhone or iPad it always prompts you for the iCloud password to remove the lock. eBay also gives you the same reminder. The only way you're selling iCloud locked devices is if you're usually too lazy to reset or it's a stolen device. (Though other situations happen - I recently sold some iPhones for my wife's family, which belonged to someone who died of Alzheimers)