Why do iOS devices take such a long time to turn back on? Often I will realise my iPhone or iPad is about to run out of battery, run around the house looking for a charging cable and plug, and get back just in time to see the screen go black and the little spinner appear.

If I plug it into a wall socket it takes about 3-5 minutes (it shows the red battery with power symbol below) to turn back on, but if I plug it into my laptop it understandably takes longer.

Occasionally once it has finally powered back up the battery percent will be more than 1%. Why hasn't it turned on ASAP?

Also if I plug the cable in less than a few second after the screen goes to the spinner, why does it take so long? It just had enough power to function fully, and now I've given it all the power from my socket, how can those few seconds make such a difference?

More importantly is there anyway to try and force the device to come back on quicker? (e.g. If your phone is dead and you plug it in because you need to phone 911) it would be nice to know even if there is way to force it to turn on only to the emergency phone screen, and not the full functionality?
Like you said in a comment, it's more a software limitation. Even though there's probably some hardware safeguard.

If you plug your iPhone a millisecond before it reaches the shutdown limit, then, no harm done, it doesn't need to shut down, power is there to keep the phone running and recharge the battery.

If you plug you phone after the shutdown limit, then the limitation is in place to ensure things will go well the next time you power it up. If it allowed to power up the phone any time, then what if it is unplugged while booting. There wouldn't be enough juice for the phone to be fully back on and it would shutdown while booting.

That's something that could damage the phone or the OS.

So to ensure that this wouldn't happen, Apple probably put the arbitrary 5% limit.