Edward Snowden, believed that the FBI was able to hack into the iPhone 5c as it does not feature Apple's Secure Enclave. Without this security feature, auto-erase functionality can allegedly be bypassed by copying what's stored in the flash memory, brute forcing some pass code attempts, and then copying the data back to the iPhone before the attempt limit is reached to reset the counter.
This method doesn't work on newer handsets with the Secure Enclave as the login attempt counter is stored within the Enclave, which cannot simply be overwritten through a simple hack.
Though the FBI is pretty keen on not telling Apple exactly how the hack was performed, as Apple would go ahead and fix the issue, preventing the FBI from using similar hacks in the future. Luckily for Apple, though, it appears like the company's newer devices are safe from hackers and other intrusions.