For the Romans (under whom these magistrates were) made it by their laws to be treason thus to abuse any of their citizens. God overruled their fear of man for the deliverance of his servants.
Related Commentaries of Acts 16:38
Acts 16:38
38 And the serjeants told these words unto the magistrates: and they feared, when they heard that they were Romans.