Not only do they sell stuff to countries , but they do buy stuff they need from other countries in case they don't have it in Peru. For example, Peru may buy some cars from the US. Maybe they don't have these cars, or it easier and cheaper to buy it from the US. Sometimes, the purchase does not benefit them economically( money wise), but it may save time and effort.
Even though many people in Peru are poor, the government is pushing to get their people out of poverty. More people are moving to the coastal and urban communities, causing rapid economic growth, and more people are getting out of poverty. The producers and consumers are effected by this economic growth positively.
Overall,Peru is a beautiful place, and it wouldn't be a bad place to live. I am happy to live here and I hope you would too if you lived here. My name is Alejandro and I just explained to you what it is like in Peru.