The Sanhedrin had a choice: obey God or obey the people. See how fear led them to a brutal, yet incomplete, decision.
The religious leaders faced a dilemma. Gamaliel, a respected Pharisee, advised letting the apostles go, warning them not to fight against God (Acts 5:38-39). This counsel, born from past experiences with movements that fizzled out, suggested that if the apostles' work was not from God, it would fail on its own. However, the Sadducees and others were likely filled with anger and saw the apostles' preaching as a direct threat to their authority and the stability of Jerusalem.
So, they compromised. They agreed not to kill the apostles, but their pride and fear wouldn't let them release them without punishment. They settled on beating them – a harsh physical punishment – and issuing a stern command. This shows how leaders, when prioritizing their own power and the crowd's opinion over divine truth, can resort to cruelty as a means of control.