I have never overheated a regulator IC so I don't know what it does to try to protect itself.
Somebody should try it and report about what happens. I wonder if all manufacturers do the same trick.
I've run a few tests :-
7805 without heatsink (apart from the crocclip holding the thermocouple sensor to the earth tag)
There was a 100nf at the input and output.
Using a 100R load and a 10V input, I got 5.06V at 49ma and after 10mins
the temperature went from 17V to 24C and stayed there.
Using a 100R load and a 15V input, I got 5.06V at 49ma and after 10mins
the temperature went up to 32C and stayed there.
Using a 100R load and a 20V input, I got 5.05V at 49ma and after 10mins
the temperature went up to 40C and stayed there.
Using a 100R load and a 30V input, I got 5.05V at 49ma
and after 10mins I got 5.04V at 49ma at 55C
-----------------------------------------
Using a 18R load and a 10V input, I got 5.06V at 278ma and after 10mins
......................................................5.04 at 277ma and 56C.
Using a 18R load and a 15V input, I got 5.06V at 278ma and after 10mins
......................................................5.00V at 274ma and 94C.
Using a 18R load and a 30V input, I got 5.06V at 278ma and after 10mins
......................................................2.64V at 142ma and 131C.
I never got it above 140C and the regulator recovered when cooled.
I also had an oscilloscope across the load but didn't detect any switching or increased ripple or noise, although while using the freezer on the 7805 I did notice some oscillations but they only lasted a few seconds and could have been the liquid freezer shorting the pins.
So my conclusion is the temperature and input voltage can be quite significant and for most purposes I wouldn't use a 'naked' 7805 for anything more than 250ma.