The proper joke is actually about trade:
Two economists were walking down the street one day when they passed two large piles of dog shit.
The first economist said to the other, "I'll pay you $20,000 to eat one of those piles of shit." The second one agrees and chooses one of the piles and eats it. The first economist pays him his $20,000.
Then the second economist says, "I'll pay you $20,000 to eat the other pile of shit." The first one says okay, and eats the shit. The second economist pays him the $20,000.
They resume walking down the street.
After a while, the second economist says, "You know, I don't feel very good. We both have the same amount of money as when we started. The only difference is we've both eaten shit."
The first economist says: "Ah, but you're ignoring the fact that we've engaged in $40,000 worth of trade!"