Originally, like all the inventors, he probably was under the Looter propaganda that he owes something to others.
But the reason why people would become doctors under Rand's system is to make money and advance their social status; that's the only reason anyone should do anything, under Objectivism.