That's usually why it is best to apply reasoning sensibly. For instance: Your programming example is missing the traditional loans from the cost-of-medical school. It is also missing the middle-man problem of insurance billing. It is also missing the incestuous role that pharmaceutical companies play in "helping" doctors to learn how to diagnose little-understood diseases such as UC.
It is better to apply the line of reasoning I gave above to situations where they apply.
There are always going to be some people motivated by money (like perhaps yourself), some by helping others, some by some other measure of personal satisfaction.
To say all physicians work on the incentive of personal money is a paranoid view which, in my experience, is grossly simplistic. There are good doctors, and there are bad doctors. It's equally (in)valid to say that everything anyone does in any profession is entirely motivated by financial gain.
Your programmer's incentive is to do a half-assed job, so you are more reliant on them for bug fixes and so on. Therefore, no programmer is going to be trying to do a good job or take pride in their work. Everyone is 100% motivated by financial gain.
His doctor may indeed suck, but he should get a new doctor, not write it off as the whole system being stacked against him.