ANSWER: According to the Bible several people have cast lots (Leviticus 16:8, Proverbs 16:33, 18:18, Acts 1:24 - 26, etc.). Its main use was to render a decision not biased and based on human choice but letting God decide the matter (e.g. the selection of a replacement for Judas - Acts 1:24 - 26).
24. And they prayed, saying, "You, Lord, the Knower of the hearts of all, show which one of these two You have personally chosen . . ." 26. Then they cast their lots; and the lot fell on Matthias, and he was numbered with the eleven apostles. (Acts 1:24, 26, HBFV throughout)
The use of the cast in public, however, determined an impartial decision based on time and chance.
Interestingly, though not commanded in the Bible, lots were cast to determine which of the priests at Jerusalem’s temple carried out a certain function like cleansing the altar or offering incense to God (The Temple at the Time of Christ, Chapter 7). They were common in games and gambling. Some of the things thrown were, depending upon the time and location, polished sticks, coins, cards, dice, bones, stones, etc.
Before the dividing up of our Savior's clothes, Herod's soldiers forced a gorgeous robe on him in order to mock him.
"Then Herod and his soldiers treated Him with contempt; and after mocking Him, he put a splendid robe on Him and sent Him back to Pilate." (Luke 23:8 - 11)
After Jesus went to Pontius Pilate, he again was forced to wear expensive clothing in mockery. The Bible is unclear whether or not this was the same garment previously used to mock him. He received his own clothes back after his torture by the Roman military.
Then Jesus went out, wearing the crown of thorns and the purple cloak . . . (John 19:5)
When they were done mocking Him, they took the cloak off Him; and they put His own garments on Him and led Him away to crucify Him. (Matthew 27:31)
(the Roman soldiers) took His garments and made four parts, a part for each soldier, and the coat also. But the coat was seamless . . . For this reason, they said to one another, 'Let us not tear it . . . They divided My garments among them, and they cast lots for My vesture (NKJV and other translations have 'clothing').' (John 19:23 - 24)
When the soldiers wanted to divide Jesus' coat or tunic, they saw it was not a patchwork of pieces sewn together. Rather, it had no seams, a quality garment that took some time to make. It was the same quality of clothing, woven from top to bottom in one piece, worn by the high priest in Jerusalem's temple. The first century Jewish historian Josephus stated in his Antiquities (History) of the Jews that the temple's high priest had to wear a vestment colored blue. This clothing was not made by pieces of clothe sewn together, or even two large pieces. It was one long vestment that was parted along the breast and back.
Unlike clothing made from pieces and thus easier to tear up, Jesus' coat would have been harder to separate into pieces. Additionally, the act of trying to divide such a seamless coat would likely make any pieces frayed and useless. The soldiers knew these facts and therefore decided to cast lots to leave it to time and chance to determine who got the entire garment.