When Jesus was crucified, his tormentors added insult to injury by mocking him. They did this by wedging a crown of thorns on his head, attaching a sign atop the cross with the words King of the Jews, and draping a scarlet cloak or robe over his body, scarlet being the colour of kings. (See also Arms of Christ.)
This latter act of ridicule also increased and prolonged not only the mental agony, but also the physical pain, as we explain below. The robe was not for comfort.
But first, let's rewind a bit to the time when the disciples go with Jesus to Gethsemane to pray. Jesus is so full of sorrow that he actually sweats blood.
It is rare, but not unknown, for people under acute stress to 'sweat blood'. Severe mental anguish invokes a 'fight or flight' reaction and blood vessels constrict. This causes momentary calm for the sufferer and the blood vessels dilate. Haemorrhage can result and where the blood vessels surround sweat glands, the blood mixes with the sweat and oozes out. This condition is known as hematidrosis.
Anxiety that is severe enough to cause droplets of blood to extrude makes the skin tender.
After Jesus was dragged away, the soldiers beat him. We must remember that Jesus had been a fit 30-something man, no doubt muscular from his wide travels and likely upbringing in as a carpenter. The soldiers would not have hesitated in being rough even though he was extremely weakened and exhausted.
By now, in addition to the pain from beating and scourging, the blood must have been flowing profusely and Jesus would go into shock. When they put the robe on him, this would have acted a little like a BandAid, temporarily clotting and slowing down the blood loss. The robe kept Jesus conscious for a little longer to prolong the suffering. When they ripped the robe off the bleeding would resume.
Then came the nails...
See also the Shrouded Cross.