When two people each have items the other wants, both people can determine the values of the items and provide the amount that results in an optimal allocation of resources. Therefore, if an individual has 20 pounds of rice that he values at $10, he can exchange it with another individual who needs rice and who has something that the individual wants that's valued at $10. A person can also exchange an item for something that the individual does not need because there is a ready market to dispose of that item.
Remember back in school when kids would swap juice boxes for chips, or cookies for Twinkies? Even children have an innate sense that the comparable value of cookies to Twinkies is in the eye of the beholder. To the kid who gets cookies every day, the elusive cream-filled cake treat is worth more than a few, and he realizes his friend might feel differently.