Although the man with the withered hand never approaches Jesus, he is present at the synagogue and the Pharisees rightly suspect that Jesus will heal him. Any normal person would view an imminent healing with joyful anticipation. The warped-minded Pharisees see only an opportunity to accuse Jesus. The question they pose, "Is it lawful to heal on the Sabbath?" casts Jesus' anticipated action entirely in terms of doing work on the Sabbath. What is lawful to do on the Sabbath? Is it lawful to do X or Y on the Sabbath? Let's consult our compendium of acceptable and unacceptable Sabbath activities and see which category "performing a miraculous healing" falls into.
Jesus answers the question by subtly recasting it: "It is lawful to do good on the Sabbath." This is not about what can or can't be done on the Sabbath. This is about what is lawful. What is moral? What is right? What is glorifying and pleasing to God? Is it lawful to do good? Of course it is. There is no law against doing good to one's neighbor. Therefore it is lawful to do good on the Sabbath.
Even the Pharisees believe this. If one of their sheep fell into a pit, wouldn't they rescue it? They wouldn't hesitate to do good to an animal on the Sabbath, so how can helping a human being be a crime? No doubt, some of the Pharisees were thinking, "Oh, but you could have waited a day to heal this man. Why violate the Sabbath to do what's not urgent?" But the example of rescuing a sheep on the Sabbath instead of waiting a day also exposes their hypocrisy. They'd rescue the sheep right away because it's the merciful thing to do. Likewise, you should have mercy on a fellow human being who is worth more than an animal, and part of mercy is that you don't hesitate to relieve them of their suffering.
So Jesus goes ahead and heals the man, and the Pharisees storm out of the synagogue and conspire to destroy him. For them the law of God isn't about righteousness or mercy or loving one's neighbor. It's about having a big stick to keep people in line. When Jesus defies their authority, they see him as a threat who must be eliminated at all costs. For all their talk about righteousness, they now find themselves discussing the murder of the Son of God. It is a terrifying blindness that convinces them that they are glorifying God even as they run headlong into insanity, power-mongering and bloodlust.