If it went all the way to 0%, the phone would simply stop running, you would loose all unsaved progress, and important memory may be corrupted. Just like when the power goes out and your PC dies. To avoid this, iPhones (and other phones) automatically shut down when the battery is almost empty.