Some minerals are essential to humans, animals, and plants.
Humans and animals will get (most of) them from the food. To be able to get it from the food, mineral sources must be secured on-world, if possible, because shipping costs from off-world sources will be prohibitively expensive, and also take freight capacity from other goods.