John didn’t want to baptize Jesus because he recognized him as Lord. Jesus was fulfilling his last requirement as a man before the Spirit descended upon him and he began his 3-year ministry.
Jesus understood his baptism justified him to those around him. If he had refused, those around him might have seen it as an act of disobedience against the law and, therefore, would not have followed him.
We all have a circle of influence, and as Christians, people are watching our behaviors. We must be obedient to the laws of this land so that those around us will be open to hearing our words about Christ.