The first reason for this is that phones may use any network which is physically capable of making emergency calls whereas normally you can only use network service for which you are subscribed or paying for.
source - https://bit.ly/3MxEqzt
The second reason for this is to fill any dead spots. Sometimes small towers are erected in remote areas. These are normally network less and only respond to emergency calls.
The third reason emergency calls work is because both military and private towers will bounce emergency calls