Salt was the only source of preservation for perishable staples which would quickly decay in the Mediterranean heat. In some cases salt even served as a remedy for ailments, especially for some stomach disorders. And about salt as a spice - for the average persons of antiquity, salt was perhaps their only seasoning. The first hearers of Jesus' teaching were not Sunday School boys seeking something entertaining in an odd analogy. Few things were more precious or essential than salt to their lives and the lives of their neighbors.
Salt is still a prevalent ingredient in our diets.
We don't realize how much so until our doctor places us on a salt free diet. Then, to our distress, we realize that most things enjoyable and convenient contain salt. It is no longer good for anything, but is thrown out and trampled under foot. For the purposes of God's vision for the world your value is lost. And thus, the saying moves from a curious statement to a harsh challenge.