It was probably quite pricy by weight. Needed mining. It would not deteriorate as long it was kept dry and free from contaminants (it's a very stable compound).
It is recorded that Roman soldiers were sometimes literally paid in salt!
There is a phrase "being worth its salt" which has survived since Roman times.
It does sound weird to be given a bag of salt for your service, and then presumably to go off and barter it. But it must have happened.
Hey, buying Morton's salt and sticking it under your mattress is still safer than buying cryptocurrency.
And sodium won't be as detrimental to your blood pressure, as crypto will!
I'd guess food preservation. I recently watched a youtube series on the Legions and how they were quite well supplied. However, I'm sure a soldier would want to preserve what he couldn't immediately eat, especially that nice fat mutton from the flock his cohort stole on their invasion route. Thrown into a bag of salt in their pack, it would keep for days, maybe weeks.