In regard to the various death penalties under Jewish law, not counting crucifixion (as the film claims the Jews ordered), hanging the corpse on a tree until sunset is part of the death penalty. Since the Jews had no authority to execute anyone while under Roman occupation, having the Romans crucify someone they regard as a blasphemer was the next best thing to being able to carry out the penalty themselves.
While it might not be all that comforting to contemplate, when you read the original account in The Bible, does it ever occur to you to wonder why Jesus was quite dead by the end of the day? Roman crucifixion victims sometimes took days to die since none of their major organs were damaged and the entire method was intended to maximize the victim's pain and suffering. This dramatization visually spells it out for you: more than a few who underwent the kind of scourging Jesus did never made it to the cross. After taking so much punishment, it's arguably a small miracle that Jesus lasted as long as he did!
And normally crucifixion victims weren't flogged precisely because it would kill them too quickly. Note that the other two crucified with Jesus are mostly unwounded.
Meta example: When this movie was being made, a lot of people thought Mel Gibson was being artsy and pretentious, with the resulting movie being regarded as anything from Torture Porn to a deep religious experience. Then came Gibson's anti-Semetic rant. Consider this: Regardless of one's personal beliefs, Jesus was a deeply influential Jew who started a major religious movement. That means that Gibson got to show an influential Jew being tortured horribly over the course of three days movie-time and three hours real time and call it art.