The most reason is date and time settings. It happens to me a lot since i remove the battery from iphone 4 while doing repairs.
When you remove battery date goes back to 1960's or 1980's. and time becomes 6:00pm. That doesnt match the information on your iphone and it becomes disabled.
Because of that phone disable itself for more than million minutes.
The best way is to put a working sim card in it and reboot 2 times. While your sim register to network it sets your date and time automaticly to today. And you can use your phone without erasing it.
It worked for me more than 100 times.