How is it possible to delete the OS on the phone? Let me guess this is an android feature?
Yes, it's an Android feature, but one you cannot access by accident. You must root a device before you can ever flash an alternative bootloader or custom ROM (or even, if you've put on a custom ROM and want the original back, the stock ROM). I prefer Android to iOS because if one is inclined to do this sort of thing it is possible to do. Anything of this nature is at your own risk and should only be done after copious research into how to root your device, back it up, flash a custom recovery, and flash a ROM.
I realize this post is now months old, but when it comes to heavy-duty under-the-hood Android there are sources better than TH. xda-developers and androidforums are both excellent resources when you're getting down to this level.