I seriously don't get why he did it. He was getting hit for a relatively minor warrant. He was essentially in the police station. Did he really think he was going to escape? And then what? The cops would forget about a prisoner with a gun escaping custody?
I can understand trying to kill someone trying to kill you. But the officer in question seemed amicable enough. He was alive and unharmed in the back. While we don't always hand out slap on the wrist sentences, why try to kill the cop and best case end up in prison for the rest of your life?
*shrug*
Best explanation I've heard from a couple of cops. Most criminals are too stupid to live an honest life.