Because many possible (reasonable) answers exist for a why question, they remain the most difficult of questions to answer. But I will try.
First, these Bible passages tell of Jesus performing miracles on the Sabbath: Matthew 12:1, 10-13; John 9:16.
Both those Sabbath miracles exposed the corruption and foolishness of the hearts and minds of the Pharisees. Being unable to deny a "notable sign/miracle" had occurred (all miracles are noteworthy or notable-that's their quality, their power, their purpose, but for emphasis I borrow and include "notable miracle" from the Sanhedrin as it used those words to describe the healing of the lame man in Acts 3:1-9; 4:13-16), the Pharisees desperately move to discredit Jesus with the charge: He violated the Sabbath. He healed a man on the Sabbath; therefore, He (Jesus) is a sinner. A teacher not to be listened to or followed. Such are the conclusions of the Pharisees. Ridiculous!
Did Jesus heal the blind man? Yes. Did Jesus heal the man with the withered hand? Yes. Now what? What is the conclusion? In the very least they confirm that Jesus has been sent from God. "If this man were not from God, He could do nothing" (John 9:32 cf. John 3:2).
The healing of the man with the withered hand on the Sabbath stirred the Pharisees to such anger that they counseled together as to how they might destroy Him (Matthew 12:14). Where does this lead? It leads to the fulfillment of a prophecy from one of the literary prophets in the Old Testament about the Messiah (a messianic prophecy), the Christ.
Why did Jesus perform miracles on the Sabbath? Because He could. Because He was Lord of the Sabbath (Matthew 12:8). Because it would expose the hypocrisy and the unreasonable conclusions of the Pharisees. Because it would lead to fulfillment of prophecy. Because it was day . . . it was time to work (John 9:4). Because it would show He was sent from God.
Even so the Bible does not explicitly tells why Jesus performed miracles on the Sabbath. And so I only offer the verses above as possibilities as to why He did.
Hope this helps.