The Sanhedrin wanted Jesus dead. Pilate acted as referee, not judge, as was the custom of the time. Jesus was thought to be no threat to Rome or Pilates'. The Sanhedrin didn't like Jesus saying he was king of the Jews
Pilate was not so keen on having Jesus executed. The custom at the time was for Pilate to grant a pardon to one of those convicted of a crime who was going to be executed. Pilate was under pressure from Rome not to let the Jewish population in the area get out of control or challenge the authority of Rome. So, he asked the people present at somewhat of a "hearing" if they wanted to pardon Jesus and the consensus of the Jewish population was no. Thus the crucifixion.