"As they stretched him out to flog him, Paul said to the centurion standing there, 'Is it legal for you to flog a Roman citizen who hasn't been found guilty?'" NIV translation
The answer to Paul's question is a big no. Therefore, can you imagine what the soldier was thinking? We can take comfort in this example as we are persecuted for following Jesus Christ. Many who do so do not know that we are royalty as children of God. Imagine their reaction when our true identity in Christ is revealed.
"When the centurion heard this, he went to the commander and reported it. 'What are you going to do?' he asked. 'This man is a Roman citizen.' The commander went to Paul and asked, 'Tell me, are you a Roman citizen?' 'Yes, I am,' he answered." NIV translation
The commander questioned Paul to see if he was indeed a Roman citizen. Being a citizen brought many rights and one of them was to have a trial before being punished.
"Then the commander said, 'I had to pay a big price for my citizenship.' 'But I was born a citizen,' Paul replied." NIV translation
The commander had worked, saved and bought his citizenship but Paul explained to the commander that he was born a Roman citizen. This is a picture of how God has joined Jews and Gentiles into one body (see Ephesians 3).
"Those who were about to question him withdrew immediately. The commander himself was alarmed when he realized that he had put Paul, a Roman citizen, in chains." NIV translation
The soldiers knew that they could be in for some serious trouble for putting a Roman citizen in chains without a trial. This was an opportunity for Paul to demonstrate the love of Jesus Christ. He could have gotten really mad and raised a big fuss but he did not.
"The next day, since the commander wanted to find out exactly why Paul was being accused by the Jews, he released him and ordered the chief priests and all the Sanhedrin to assemble. Then he brought Paul and had him stand before them." NIV translation
Now, the commander stopped to find out the truth and so ordered Paul to stand before his accusers. You can almost feel God getting ready to use Paul here in a mighty way. Out of Paul's obedience to God comes another opportunity to testify about Jesus.