I have also found that one of the motivations to program is to do things that have not been done before. Everything you create is an innovation, in one way or another.
Whereas if one is a doctor or lawyer, introducing innovations into the field is much, much harder.
That's a very good point. Doctors and Lawyers, to take your example, are obviously intelligent and by definition successful people. Yet their success is capped, there is a ceiling in these careers - a lawyer can never really change the world affecting literally millions of people. Sure he can work on an important case, and sometimes the law can change as a result of important cases (well not so much the law, but the interpretation of it) but he/she will never make a world-shattering breakthrough, a product used by hundreds of millions of people, in the way that a software engineer can.
Whereas if one is a doctor or lawyer, introducing innovations into the field is much, much harder.