The SIM is what separates your identity from the hardware of the phone (which has its own identity called 'IMEI').
A 'software solution' would need a carrier, that carrier IS the SIM.
Another nice benefit of having the SIM device is that it makes it much harder to 'clone' a subscriber ID, something that would regularly happen in the days before the SIM card, note that the SIM was a development that came along with GSM, and that GSM was the first mobile phone standard resistant against cloning. It's one part of the 2FA (something that you have) that gives you access to the phone network (the other being the PIN code (something that you know) required to unlock the SIM).