Doctors undergo a decade of training followed by several years of internships and residency. Software engineers barely have four year college degrees.
Doctors sign a Hippocratic oath to do no harm. Software engineers sign no such thing. Most software engineers shouldn’t even be considered engineers. Engineers can build safe bridges and safe buildings, while most software developers can hardly get to work without tripping over a cable.
Doctors are mostly self-employed, set their own hours, and run their own businesses. Software engineers for the most part are subject to customer and their employer’s schedules.
Doctors must respond to real emergencies that involve life and death situations. Most of software engineers do not do anything even remotely indicative of a life and death situation.
No one is going to die if a software engineer does not respond to an emergency within minutes, and that is the most important difference.