Yang Jia, who was executed by lethal injection this week, was an unlikely hero. On July 1, the 28-year-old stabbed six police officers to death. Nobody has suggested he didn't commit the crime. Yang Jia himself said it was an act of revenge. He and the police agree that last year he was detained for riding an unlicensed bicycle. Yang Jia said he was beaten; the police denied this. Yang Jia demanded compensation, and when it was refused, he committed mass murder.

It's a straightforward and terrible story. A young man suffers a grievance – real or imagined – and it festers. Months later, unable to extract the redress he believes he is owed, his frustration explodes with violence out of all proportion to the abuse suffered.

What followed – the harassment of his lawyer and family, questions over the legal process, the death sentence – were not unexpected. What has been shocking to many observers, however, has been the widespread support for Yang Jia. This support has been expressed on the internet, and in gatherings outside the courthouse, and by prominent critics of the Chinese government.

Most obviously, this support for Yang Jia exposes widespread contempt for the police, and an instinctive belief in Yang Jia's allegation that he was beaten in police custody. Many people have said they do not think they have been allowed to hear Yang Jia's side of the story.

I think the support for him also speaks to something deeper. He is not the first murderer to elicit public sympathy in China. Nearly thirty years ago, in 1979, a young woman surnamed Jiang Aizhen serving in the army became the target of rumours that she was having an affair. When she complained to senior officers, they sided with her tormentor. Driven to desperation by her inability to clear her name, she shot dead three officers. When she was sentenced to death, the case was reported in the People's Daily. What followed was extraordinary in China – a vast outpouring of sympathy for a convicted criminal. Like Yang Jia, there was no doubt that she was guilty of the crime, but thousands of people wrote letters sympathising with her plight, arguing that if the state did not provide access for vulnerable people to right wrongs, then the state must bear partial responsibility when those who were wronged took things into their own hands. The authorities came under such pressure, and were made so nervous by public opinion, that the court changed its verdict to 15 years in prison. It was almost an acknowledgement by the courts that allowances must be made for people who were driven mad by the system.

Then, in 2005, there was the case of Wang Binyu, a migrant worker from Gansu Province who had the bad fortune to work for an employer who did not pay him what he was owed. Wang's pleading fell on deaf ears. Eventually, in desperation, Wang took the law into his own hands. He killed four foremen, then surrendered to police. The court sentenced him to death, but his case brought a torrent of sympathy on the internet. After a few weeks the authorities silenced it, and before the end of the year Wang was secretly executed.

I think the support for Yang Jia stems simply from a widespread understanding that the system here exposes some people to intolerable pressure, and that they cannot be held accountable for breaking under that pressure. It is an understanding born of empathy – so many people have bashed their heads against the brick wall of injustice. In many cases, the answer to that intolerable pressure is suicide. In most case, people simply continue as well as they can with their lives. There is little likelihood that a grievance can be independently assessed, or that you can take to court someone more powerful than yourself. The petition office in Beijing is where people come from all over the country to beg for the justice which has eluded them in their home towns. They plead for redress, but they are as likely to be sent home or put in jail as to be helped. And so the grievances fester.