Pilate didn't want to do that. It was God's will. Neither the Romans nor the Jews of the day can be blamed if what Jesus said was true - that his crucifixion was pre-ordained or providence or something.
Pilate later committed suicide in Spain. God chose people who were already morally corrupt enough to do things that were not something a decent person would do.