This is all just nonsense, of course.
Pilate didn't know what offense Jesus had committed. The Bible certainly says nothing about a "riot" in the temple, as if Roman authorities cared about the goings on in the Jewish temple, anyway.
And Rome had no law against anyone developing a following, or against anyone claiming royalty in a religious sect.
I would not call it nonsense. It is possible the Bible doesn't record the entire events of that time. There are a few things that were recorded that don't make immediate sense to us. People have come up with theories. Facts:
There was always an insurrection brewing against Rome.
Jesus was an irritant to Jewish Temple Authorities.
The Sanhedrin does not interrupt a Passover celebration to hold a trial.
The comment that better one man die...indicating the authorities thought Jerusalem was in imminent danger from Rome.
There appeared to be two Jesus (or Yeshuas). One called himself the Son of the Father (Bar Abba); the other might have been known as the Son of one of the Priests (Bar Abbas).
Jesus had caused a kerfuffle in the Temple.
We can imagine the Sanhedrin meeting if there was a danger that if the son of a high priest had been arrested for insurrection, Rome might punish everyone associated with the Temple, killing many. What if Bar Rabbas had been arrested and the Temple authorities convinced Pilate he had the wrong man, that Pilate wanted that guy Jesus who called himself Bar Abba, and had been overturning tables in the Temple. In this way the Jews in authority would save themselves while at the same time get rid of the guy who was telling people sins ARE forgiven (even before they offer a Temple sacrifice). Remember, other than the Bible there is no hint that one criminal was released during Passover or any time. It is more likely that Pilate was convinced (or let himself be convinced) he had the wrong man. The two men crucified with Jesus knew he was not the one involved with their insurrection.