Ah the gold piece. The staple of the RPG economy. But why?
Because, while your fictional characters live in their world 24/7 and know the value of the things they have and need, your players are at the table for a few hours every week or two, and have day jobs. Money is an abstraction so we don't have to keep a huge table of relative values to check on.
Plus, the barter system works when you are within a fairly small domestic agrarian community. Trading chickens for other food or everyday home goods works. But the PCs are not generally part of such a society, and they do not have, or need, many things that exist in a small, domestic agrarian society. Nor do most of the things you'd trade in a small, domestic agrarian society travel particularly well. How long is the party rogue going to try to keep 27 chickens alive in their Bag of Holding, do you figure?