You have no idea about short term gain vs long term gain.
This is typical greedy algorithm. As somebody who knows a little about algorithm, this greedy algorithm sometimes is the optimal algorithm, but often times it is not.
Besides, money is not everything.
