Many already do this. The iPhone has done since the 3GS - all the data in the flash memory is encrypted by a hardware encryption module. The idea is so that if someone manages to dump the flash memory from the phone it should be unreadable, without the encryption key that is burned into the phone's individual processor during manufacture, and not accessible to the OS or any other software.
The hardware processor is meant to verify the OS boot-sector (to make sure it is legit and not tampered) and lock-down if it detects a modified OS. However, apple somehow screwed up this function, as the jailbreak groups (and forensic examiners) have found out. If this function did actually work as intended, jailbreaking would be extremely difficult, and forensic examiners wouldn't be able to analyse the phone.