The Pharisees and the Herodians would not usually be on the same side. The Pharisees were anti-Roman and believed in a coming Messiah. They kept the Law assiduously and Jesus did not match their criteria for the promised king. The Herodians on the other hand had their king already in the person of Herod. The status quo suited them and though they would not have liked Roman rule, they put up with it. An unholy alliance developed between the two factions because Jesus suited neither. The question they posed for him illustrates their differing preoccupations. If Jesus forbade the Roman tax then the Herodians would be alarmed because this could incur imperial wrath and upset their comfortable position. If Jesus agreed to the tax the Pharisees could point him out as a collaborator with Rome, which would offend religious teaching and be unpopular with the oppressed people.
Perhaps Matthew placed the story shortly before the trial and death of Jesus, ensuring that his readers knew that Jesus was not inciting people to rebel against the Romans. Of course everything is owned by God and emanates from him; however, as Jesus said to Pilate, power was given to him from above.
Cyrus, King of Persia, seemed to understand that this power was to be used to govern for the benefit of his people and to facilitate their religion, even though Isaiah tells us that he did not know God. It is necessary to maintain a delicate balance between church and state so that neither becomes too powerful and there is a healthy tension between them. Yet, as St Joan of Arc said: “We must serve God first.”