John 7:21-24 — Jesus answered and said unto them, I have done one work, and ye all marvel.
Moses therefore gave unto you circumcision; (not because it is of Moses, but of the fathers;) and ye on the sabbath day circumcise a man.
If a man on the sabbath day receive circumcision, that the law of Moses should not be broken; are ye angry at Me, because I have made a man every whit whole on the sabbath day?
Judge not according to the appearance, but judge righteous judgment.
The healing of the man at the pool of Bethesda was why the Jews hated Jesus (John 5:1-16).
Jesus' point was that, in order to fulfill the law, they circumcised on the Sabbath if it was the eighth day after a boy was born. If circumcision was OK, wasn't healing?
They kept the letter of the law, but not the intent.
Works of necessity and/or mercy were allowed on the Sabbath.