When the soldiers crucified Jesus, they took his clothes, dividing them into four shares, one for each of them, with the undergarment remaining. This garment was seamless, woven in one piece from top to bottom.
It was customary for the soldiers on duty at a crucifixion to divide the clothing and personal possessions of the prisoner among themselves. We would look at it today as a fringe benefit of the job. The Jews generally wore 6 articles of clothing: a loin cloth, which they apparently let Jesus wear to the grave, a pair of sandals, a head covering, a belt, a robe, and a tunic. The four soldiers, a typical quaternion which would have had a centurion in charge (Matt 27:54), each took one article of clothing, perhaps deciding who got what by a cast of the dice, but left the tunic until last.
Matthew 27:54 When the centurion and those with him who were guarding Jesus saw the earthquake and all that had happened, they were terrified, and exclaimed, “Surely he was the Son of God!”