Non-farmers in Peru used to be able to afford food. In a sense, they were getting discount-priced quinoa.
Now, farmers are selling quinoa to foreigners, so the farmers are making more money, but everyone else is paying more for food.
One solution would be to impose some sort of tax, to share the windfall quinoa profits with the former customers, or cooperative community ownership of the farms. Or farmers spending their increased profits on the labors of other locals in the community.