Before the crackdown, the Chinese government was willing to wait out the protests until people had their say and it was all over with. Except the protests went on, continuously, for months. If they had turned violent, they would have likely been able to overrun the central government entirely.
I'm not going to justify what the Chinese army did in Tiananmen Square, but what they did, they did as a last resort. If they had been a little more proactive and arrested the first few hundred people before it blew up, or impeded access into the square, or did anything to prevent that critical mass of people from assembling all in one place, it would be a different story.