Supermarkets have to work with suppliers who are local as well as far away. The need to supply good quality products at low prices means that they can't do business with farmers who don't produce good quality products in large quantities. Their research shows that customers want good looking food, not apples covered in scabs and bruises, so they don't stock food that looks bad. In the modern world there are other ways for small farms to sell their produce, like farmers markets and farm shops.