A mob quickly formed against Paul and Silas, and the city officials ordered them stripped and beaten with wooden rods. They were severely beaten, and then they were thrown into prison. The jailer was ordered to make sure they didn’t escape. So the jailer put them into the inner dungeon and clamped their feet in the stocks.
Around midnight Paul and Silas were praying and singing hymns to God, and the other prisoners were listening. (NLT)
Put yourself in Paul and Silas’ sandals. You have been unfairly arrested and brutally beaten and thrown into a dark dungeon. What would you do? Fume either publicly or privately about how badly you have been treated? Demand an immediate hearing and instant release? Complain to God about how he treats those who are only trying to obey his commands?
All understandable responses. Paul and Silas end up doing something not so easily understood. They held their own little church service. They prayed and sang songs even in dank darkness and enduring physical pain from their beatings. They were not focussed on their own painful circumstances but on the character of God.
This is not pious denial of hardship. It is not passive submission to circumstances: the next day Paul stood up for his rights as a Roman citizen. It is simply a recognition that God remains God no matter what situation we are in. We can still praise him, not for our specific situation which may be bad, but for the fact that he remains good in the midst of it.
We are shaped to some degree by what happens to us. But we are shaped far more by how we respond to what happens to us.