Matthew 12:9-14 is in many respects very similar to John 9. Jesus healed a man with a chronic problem. It was not an emergency situation. He could have allowed the person to go on and heal him after the Sabbath was over, but He deliberately chose to heal him on the Sabbath day. Why?
The answer is to show us that God's mind, His nature, His law, is always to be merciful under every circumstance. In following His example, we have to make sure that what we are doing, our intent, really is showing mercy to the person. Necessity in this case did not demand that He heal the man on the Sabbath, but it provided an excellent example that mercy is always right when the opportunity presents itself.
Even though Jesus had the power from God to do this, He did not frequently go out of His way to heal people on the Sabbath. On the other hand, if people came to Him on the Sabbath, He healed them.
The Pharisees were so far from God that they were blinded to the wickedness of their plans. They were looking for an opportunity to get evidence against Jesus to kill Him. Their wicked motivation for their actions is probably the most gross Sabbath violation in all the Bible: They used the Sabbath to plot the murder of an innocent Man.