I can't recall the name of the experiment, but it explains this behavior quite well. The one where people were giving shocks to someone while a researcher stood by and told them they would be absolved of any responsibility.
If you absolve people from responsibility and an authority gives them a command, the vast majority of the time they will follow it. It'd take something really heinous or someone of exceptional character for them not to. You can say you wouldn't do so in the same situation, but that's statistically unlikely. Most likely these people are much like you.
These officers were given orders to use force. So they did. Any guilt is washed away under the excuse of "well I can just blame my supervisor." Which is true.
Why they turned away an ambulance I don't know, but murderous intent seems unlikely, especially since they (eventually) called the fire department to take him away instead of making him rot in a cell. My guess is they were told to arrest people, and he was definitely in their custody. Letting him go to a hospital is letting him "get away." Also, most people don't realize being knocked out is often really bad, not just mild incapacitation like on TV. Police officers should know better, of course, so there's definitely some stupidity here. Malice though, I do not have enough evidence to reasonably make that assumption, at least not for individual officers there.
The malice and stupidity that needs to be focused on is the malice and stupidity that brought all this about in the first place. There's a lot of stupidity here because the best way to get rid of non-violent protesters is to ignore them. There's a lot of malice here because someone up the chain of command thought force would somehow be a good (not to mention justifiable) idea.