I can think of a few instances that they would probably fire someone over the phone rather than in person. And if they try calling several times and nobody answers, then resort to voicemail.
For it to be done over the phone and not when you walk in you a) where a temp b) where a seasonal c) threatened physical violence or d) had a reason to believe you would be violent when being fired.
Also, no it isn’t illegal nor is it against policy to be fired over the phone.