Because he was allergic to it
Gandhi protested salt because he was protesting the British salt monopoly. He wanted to protest to show England that they did not have the right to tax them on salt.