Salt is used as a preservative because of its low cost and ease of use compared to other preservative methods. Refrigeration requires electricity, while chemical preservatives can alter the taste of food and cause health effects. Salt was one of the first methods of preserving food.
Salting preserves food by reducing the amount of moisture present. When salt is added to food, it draws out moisture from the cells through osmosis, as the cell membranes attempt to balance the salinity inside and outside of the cell. This draws out so much moisture that there is not enough left for bacteria to survive, preventing spoilage. Large amounts of salt can destroy bacteria directly by drawing the moisture out of the organisms as well.
Salting food for preservation purposes often requires using far more salt than would be palatable. When the time comes to prepare the preserved food, it must be washed and soaked to remove excess salt from tissues and cells, then it can be prepared as normal. However, salting does tend to create changes in texture and taste that does not entirely go away, meaning a preserved piece of meat may never reach the same level of quality as a freshly prepared cut.