Was there at any point that the iOS was changed or manipulated by you or a program by any chance? Was there an attempt at jailbreaking or was there a malware that snuck by and installed itself though any means (suspicious website, bad program, malicious cable connector, etc although this is a slim chance) ? I believe that could be what you mean be 'broken' in this context.
I know that is an extreme scenario but it could simply be the iPhone locking itself after 10+ incorrect passcode attempts and the device wipe is activated. At this point, both situations in my reply should call for a appointment at Apple or approved repair shop for a complete technical reset or other options they may consider for you.