Luke 11:38 - "When the Pharisee saw it, he was surprised that He had not first ceremonially washed before the meal."
If we are still "doing" acts of holiness to get God to move in our lives, then we are still operating under a "law" mentally that is not faith (Galatians 3:12).
The legalist thinks, 'I can GET God to heal me by confessing "by His stripes I am healed.'" The person who understands God's grace will not confess God's word with the motive of trying to GET God to heal him but will confess "By His stripes I am healed" because he really believes it has already been done at Jesus' finished work at the cross.
If the motive for our actions is to be accepted by God, that's legalism. If we live wholly out of faith and gratefulness for what Christ has already done, that's grace. Grow in Grace!