In that time the cruel British stopped the production and manufacturing of salt.Thus they established the salt law! But salt was a very essential food ingredient and was also required in many other purposes. Gandhi ji knew it and understood it. So he began the Salt March to protest again this cruel act and to break this Salt law and also start the production and manufacturing of salt in India! This is why Gandhiji chose to break the salt law!
I hope this answer might be helpful to you!