This is true even for animals. They repeat the behavior which rewards them (reward is food). This is the reason why these wild creatures can be made to jump through hoops, because their Dopamine gets triggered if they do.
Now, comes the philosophical angle to it. In Bhagvad Gita, Lord Krishna asks Arjun not to think about rewards and just do his job. Thee were innumerabl conjectures by many people over many years. Some say that it makes the job more efficient if there is no expectation of the outcome. Some say that it frees the mind from the sense of lust, greed and material gain. But I believe it might have a more profound connotation. It asks humans not to behave as an animal. This is of extreme importance. By refusing to accept the Dopamine induced reward system inherited from our beastly ancestry, we would be transcending to a higher level of consciousness.