Then the soldiers, when they had crucified Jesus, took His garments and made four parts, to each soldier a part, and also the tunic. Now the tunic was without seam, woven from the top in one piece. They said therefore among themselves, "Let us not tear it, but cast lots for it, whose it shall be," that the Scripture might be fulfilled which says:
"They divided My garments among them,
And for my clothing, they cast lots."
Therefore the soldiers did these things. And there stood by the cross of Jesus His mother, and His mother's sister, Mary the wife of Clopas, and Mary Magdalene. John 19:23-25
Amazing to me is how God foretells, hundreds of years before this event, how the Roman soldiers would gamble for Jesus' clothes:
"They divide my garments among them, and for my clothing they cast lots." Psalm 22:18
Jesus shows us what we are to do when others wrong us. He asked His Father to forgive them. This is to serve as an example to us of how we should treat others when they are mean to us, even when they hate us. We know from God's Word that we should pray for our enemies, but we are also told that we need to forgive them, just as Jesus showed us.