What if you develop software for medical equipment?
Then you're a programmer, not a doctor.
still the doctor has a piece of paper saying that some checked his or her qualifications
Yes. That's how we keep the frauds and whackjobs from killing people.
"Gatekeeping" is a dirty word on HN, but it also has its usefulness. We don't let just anyone drive a car, even if they really really really think they know how. You have to have a license.