I remember once I spilled salt and one of my aunts told me to quickly like grab a pinch and then just throw it over my left shoulder cause supposedly there was a devil there always lurking and so by throwing it I would hit him in the eyes and I guess it would make him go away. Also I think there was something about how your guardian angel was always on your right shoulder and they would like make you spill the salt magically I guess to warn you of an evil thingy behind you so you throw salt to avoid bad luck and to scare the devil.
After looking more into this story, it comes from European countries in a time where salt was scarce so therefore it was said any person who spilled salt would have a bad omen because it was a luxury so in order to avoid that bad omen or bad luck the person was supposed to grab a pinch and throw it over their left shoulder. Then it developed into the story in which the devil lurks on ones left shoulder and the angel on the right and therefore throwing salt into his eyes would make him go away. These stories and folklore make me realize the way people will shape their beliefs in order to feel safer against the evil.