According to Luke 6:6, this event "happened on another Sabbath" (i.e., a different Saturday than the one in which the Pharisees condemned them for plucking grain). Jesus entered the synagogue and there was a man with a withered hand present.
The Pharisees asked Jesus if it was lawful to heal on the Sabbath. Their tradition forbid that anyone be treated medically on the Sabbath unless their condition was life threatening (which was not the case with this man). They do not ask our Lord this question out of genuine interest in learning God's will, but rather, they desire to find a way to "accuse Him" (Matt. 12:10).
Jesus knew the thoughts of the Pharisees (cf. Luke 6:8). He knew they were testing Him, and He was not afraid. He commanded the man with the withered hand to rise.
Jesus then responded to their question with His own question - "Is it lawful on the Sabbath to do good or to do evil, to save life or to destroy?" (Luke 6:9). The scribes and Pharisees attempted to put Jesus in a dilemma, but He directed it back to them. He wanted to know what they would do if they were in His sandals.
There were two possible courses of action here: (1) Heal the man (i.e., "do good") or (2) don't heal him (i.e., "do evil"). For Jesus to not heal the man merely out of respect for their traditions would be "evil" since He was capable of doing this good act and the opportunity had presented itself (cf. James 4:17). The religious leaders were silent. They were stubbornly unwilling to admit that He was right. This angered Jesus (cf. Mark 3:5). He was "grieved by the hardness of their hearts." Their hearts were rock-hard in that they were insensitive to the suffering of others and were full of envy and hatred. This is what caused Jesus' anger.
He asked them some other questions in Matthew 12:11,12 - "What man is there among you who has one sheep, and if it falls into a pit on the Sabbath, will not lay hold of it and lift it out? Of how much more value then is a man than a sheep?" The implied answer to the first question was that any of them would rescue their sheep under such circumstances. Likely this would be the case whether they owned "one sheep" or many. Thus, they would help a sheep in need on the Sabbath, and they believed this to be lawful. A human being is certainly of much more value than a sheep! Hence, it must also be lawful to rescue or heal a man in need on the Sabbath.
After establishing the correctness of miraculous healing on the Sabbath, Jesus proceeded to heal the man. He didn't, however, do anything other than speak to accomplish the healing. Thus, the Pharisees could find no legal grounds for accusation, even though they wanted to.
Tragically, when men are determined to maintain a position, without regard to truth or justice, defeat in argument typically throws them into a fury (cf. Luke 6:11). The Pharisees left in a rage and plotted together as to "how" they might destroy Him (Mark 3:6). They were already determined to do so; the only questions that remained were "how" and "when."