In the Bible we can find how everything that Jesus went through from the time that He was arrested to the His death was to redeem us.
Read: the words of King Solomon in Proverbs 20:30
Read: the words of the prophet Isaiah in chapter 53 verse 5.
Read: the words of the apostle Peter in 1 Peter 2:24 as he quoted Isaiah.
Each blow that Jesus took was to cleanse us from evil. Each stripe that He was given was to cleanse the inner depths of our hearts.
In closing read Jeremiah 17:9 and remember that this is why we need our L-RD and Savior and He paid the ultimate price for us because He loves us.