What does Matthew 27:27 mean?
Pilate's soldiers take Jesus into the courtyard of the governor's headquarters, also known as the Praetorium. All of them gather to participate in mocking Jesus as the King of the Jews. A full battalion of Roman soldiers would have included 600 men at full strength. It's unclear whether that many were stationed there at this time. Given the crowds coming into Jerusalem for Passover (Matthew 26:17), that's entirely possible.John notes that Jesus was scourged and humiliated before Pilate issued his final sentence (John 19:1–5). Matthew's account, in keeping with his style, seems to arrange Jesus' experiences by theme, instead. So, he details these physical abuses in a single block, continuing through the crucifixion.
That so many soldiers are present in this mockery adds to the list of those who could be held directly responsible for Jesus' torture and death. The list begins with Judas and the Jewish religious leaders. It includes, as well, Pilate, his soldiers, and all the people in the crowd who called for Jesus' crucifixion. On a larger scale, though, those responsible for Jesus' death include everyone who has ever lived. Jesus became the sacrifice for human sin, something of which every person is guilty (Romans 3:23). Everyone who comes to faith in Jesus for the forgiveness of their sin benefits from His death, as well. We would be lost without it.
Even knowing this, it can be difficult to imagine Him being mistreated with such profound cruelty by the vicious Roman soldiers in the following verses.