And it happened that He was passing through the grain fields on the Sabbath, and His disciples began to make their way along while picking the heads of grain. The Pharisees were saying to Him, “Look, why are they doing what is not lawful on the Sabbath?”
And He said to them, “Have you never read what David did when he was in need and he and his companions became hungry; how he entered the house of God in the time of Abiathar the high priest, and ate the consecrated bread, which is not lawful for anyone to eat except the priests, and he also gave it to those who were with him?
Jesus said to them, “The Sabbath was made for man, and not man for the Sabbath. So the Son of Man is Lord, even of the Sabbath.”
Mark 2:23-28
Jesus understood that people do what is necessary to survive. In this case, His Disciples picked grain from the field to eat on the Sabbath. It was an action that hurt no one, but seemed to break the religious law against working on the Sabbath.
Jesus did not say that they had not broken a religious law, but pointed out that even David, who was highly esteemed by the Jews, had taken liberties with the laws of the Sabbath.
Jesus indicated that doing the right thing out weighs following religious customs. This being said, we can consider when we take actions to which some might object, if the action is a violation some of man made religious customs and, if so, does the violation matter or not?
Then we do what is necessary.