There seems to be something special with key-persons in the  Bible and being prisoners. Many of the most influencal characters have been once or multiple times imprisoned. Here are just a few examples:

Jezus was a prisoner – Mark 14:46-49 ; Jozef was in prison – Genesis 39:20-22 ;

Samson was in prison – Judges 16:21-22 ; Peter was in prison – Acts 12:5-8

Paul was in prison – Philippians 1:12-14

The Bible is also unmistakably clear that Gods’ people need to look after prisoners. God gives clear instructions that He wants us to focus on the vulnerable people around us, ánd on prisoners.  It’s even that important that Jesus identifies Himself with this group of people: Isaiah 61:1-3 and Lucas 4:18-19

Caring for prisoners is a factor for our eternal salvation – Matthew 25:34-36

Our attitude towards prisoners should be sincere – Hebrews 13:3