In third grade Catechism we were taught that the Centurion out of a sincere desire to end Christ’s suffering by hastening His death. It was common at the time for death by crucifixion to take several days, while the Lord was condemned in the morning and dead by sundown.
That may have been the Centurion’s intention. Pilate ordered the crucified men to be killed and the bodies taken down, due to the oncoming Sabbath, but Jesus was already dead. The spearthrust would have been more along the lines of “making sure”. The thieves were killed by breaking their legs.