Salt for bad spirits

My informant is an American from New York, whose family originally came from Poland 100 years ago. His grandfather was a baker and his grandmother was a peasant girl.

“She used to take salt with her when she went to new places, put them at corner and drive away bad spirits.”

“I think it’s their superstition from their peasants’ logic 100 years ago.”

I’ve actually heard this mystic belief of connection between salt and bad spirits in more than one cultures. To me it sounds very random and arbitrary, but if this activity could comfort the people who believe in that from anxiety and insecurity, I don’t think it should be criticized as superstition in a harsh way.