I agree that if the economy reliably distributes resources in a manner which is fair and is best for everyone, then fungibility of money implies that the most altruistic thing to do would be to create the most value as measured in dollars.
However, the economy is in fact not like this (and you seem to agree). I don't understand why our hypothetical teacher/trader should act like it is.
A very interesting article on "earning to give", featuring LessWrong members Jeff Kaufman, Julia Wise, Holden Karnofsky, William MacAskill and Toby Ord. Some excerpts: