The soldiers twisted together a crown of thorns and put it on his head. They clothed him in a purple robe

Thorns came about as part of the curse against Adam for his sin in the garden (Gen 3:17-19). The soldiers put the crown of thorns on the head of Jesus for 2 reasons: to mock His supposed status as king of Israel and to cause Him suffering and pain. However, there is certainly some symbolism involved here as Jesus bears the curse meant for us.

Genesis 3:17-19  To Adam he said, “Because you listened to your wife and ate from the tree about which I commanded you, ‘You must not eat of it,’ “Cursed is the ground because of you; through painful toil you will eat of it all the days of your life.  It will produce thorns and thistles for you, and you will eat the plants of the field.  By the sweat of your brow you will eat your food until you return to the ground, since from it you were taken; for dust you are and to dust you will return.”

The purple robe was actually scarlet (Matt 27:28), a robe worn by military officers and men in high positions. In that time there was not much distinction between colors and the soldiers would not have had access to a purple robe, which signified royalty. The officers would have had their own scarlet robes and though the colors were different, it gave the same general idea. The symbolism involved here is of Jesus being clothed with our scarlet sins (Isa 1:18).

Matthew 27:28  They stripped him and put a scarlet robe on him,

Isaiah 1:18  “Come now, let us reason together,” says the LORD. “Though your sins are like scarlet, they shall be as white as snow; though they are red as crimson, they shall be like wool.

The mockery of the soldiers is aimed not at Jesus in particular, but the Jews in general. Jesus was simply a convenient means of their proclaiming their contempt for the Jewish people and nation. Life was probably boring in that backhole of a country and entertainment was scarce. Pilate would have done nothing to discourage such an action since it suited his purposes perfectly.