Pilate did not think Jesus was guilty. Per the custom he would release one prisoner each year. He offered to release Jesus but the crowd yelled for Barabbas.
15 Now at the feast the governor was accustomed to release for the crowd any one prisoner whom they wanted.16 And they had then a notorious prisoner called Barabbas.17 So when they had gathered, Pilate said to them, “Whom do you want me to release for you: Barabbas, or Jesus who is called Christ?”