Scandalous
Apparently Jesus had been flogged earlier, as part of his interrogation. Immediately after sentence of crucifixion was passed, Jesus was flogged again (v.26).
This was standard procedure; it was customary to flog prisoners before taking them out to be crucified. But what takes place in verses 27 to 31 is not standard procedure. It is more like barracks-room humour.