2454 Now we see the piercing of Christ's body: the act itself; and then the certainty of what the Evangelist tells us (v 35). With respect to the first he does two things: first, we see the intervention and intention of the Jews; secondly, this is partially accomplished; thirdly, how this was accomplished with regard to Christ.
2455 With respect to the first he says, Since it was the day of Preparation, in order to prevent the bodies from remaining on the cross on the sabbath (for that sabbath was a high day) the Jews asked Pilate that their legs might be broken, and that they might be taken ...away. In Deuteronomy (21:22) we see that it is a precept of the law that the bodies of the dead who had been hanged for crimes were not to be left hanging until the morning, lest the land be defiled, and to blot out the disgrace of those who were hanged, for this kind of death was regarded as most disgraceful: "a hanged man is accursed by God" (Deut 21:23). Although the Jews did not now have the authority to inflict this punishment, they still tried to do what they could. And so because it was the Preparation day they asked Pilate that their legs might be broken and that they might be taken away, so that Christ's body and those of the others would not remain on the cross on the sabbath, which was a very solemn day, and particularly this sabbath during the Feast of the Unleavened Bread. They were careful to keep the law in small matters, but they ignored it in important things: "You blind guides, straining out a gnat and swallowing a camel!" (Mt 23:24).
Source: Commentary on John