Rand observed that “one of [his] biggest mistakes in life was not recognizing early that the most effective way to achieve my goals would have been to get wealthy first, then to apply that wealth toward them”. The basic economics point is that if you earn as much money as possible by specializing in what the economy will pay you the most for, you can often hire a specialist to do far more good with the money you made than you could have doing the good personally.
Another way to state this is doing nice things is fun; nice is an economic good. So if you want a pleasant job, other people who like pleasant jobs will compete and drive the price down until the low pay makes it unpleasant enough to clear the market.
This makes Bill Gates’s career change to spend his fortune a global tragedy worse than the monetary damage of Hurricane Katrina. He is likely to be much closer to average in his ability to make the world better by giving, compared to making the world better by making better software and operating systems.
The salary offered to you for different occupations summarizes what the economy values most from you. Accountants and lawyers may seem less useful than teachers and engineers, but that is a fallacy of confusing the average value of a teacher–which may be very high–to the market price of a teacher which will be much lower if there are lots of people who want to be teachers.