From the User's Guide:
If the interior temperature of iPhone exceeds normal operating temperatures, you may experience the following as it attempts to regulate its temperature:
- iPhone stops charging
- display dims
- weak cellular signal
- temperature warning screen appears
Important: You cannot use iPhone while the temperature warning screen is displayed except to make an emergency call. If none of the above measures succeeds in lowering the internal temperature, iPhone automatically goes into a deep sleep mode until it cools. You cannot make an emergency call when iPhone is in this mode. Move iPhone to a cooler location and wait a few minutes before trying to use iPhone again.
There have been numerous cases of all sorts of consumer electronics melting/exploding, and these have often been settled with lawsuits. It is appropriate that the iPhone take preemptive measures to avoid such accidents.