That's not how it really works, since anyone who is an observant Jew well knows that the "preparation day" precedes the first day of Pesach. Thus, John's account is far more likely than what's found in the synoptic gospels. And supporting this is that the Sanhedrin met, according to the gospels, which they cannot do on Pesach.
Yes, it is illegal to hold a trial on the night of Passover, but this does Not deter the Sanhedrin from pursuing their wicked purpose.
Remember they were Not an un-biased group.
After Jesus resurrected his dead friend, the supreme court / Sanhedrin decided that Jesus should die - John 11:47-
53 and also his resurrected friend to be put to death - John 12:10.
Days earlier the religious leaders were already conspiring to seize and kill Jesus - Matthew 26:3-4.
So, even before any 'legal trial' Jesus was already as good as dead to them.
Because of their 'illegal meeting' those of the Sanhedrin try hard to find witnesses who will give false evidence.
The many they find do Not help them because those testimonies are Not in agreement - Mark 14:57-59.
After Caiaphas rips his garments the Sanhedrin hands down Jesus' an unjust death judgement - Matthew 26:65-66.
We can see just how early in the morning that illegal night trial ended at John 18:24-27 ( at the crowing of the cock ).
So, what we see in the scene is Jesus being treated with abuse at that -> illegal night time trial !
Remember: those wicked leaders were: law breakers.