Last time I needed an iphone repaired (a 1 hour in-store screen replacement), they asked me to write down my passcode on the repair authorisation form! They also seemed really offended when I said I'd rather erase it instead.
Apple could do a much better job in this department.