They see it bloodied and writhing and feel no empathy for an animal doing what animals do.
No, I expect they felt empathy for the man who died.
I believe they were acting out of very old, tribal, primal instincts to kill the creature who had torn apart another human.
The overall situation is of human making (over fishing the waters, chucking scraps to attract sharks, encouraging tourists to swim when it's not safe there) but I think seeing a person torn apart in front of you would unleash some old amygdala-driven instincts to protect your own kind.
Fight/ flight/ freeze or fawn all activate in this kind of situation. Freezing or fawning are not useful here. Flight will manifest in the people scrambling to get away.
Fighting to reclaim the water from the predator was a pretty natural outcome. It is not surprising that the shark was killed.
We're animals too, with a very ancient reptilian brain making very fast decisions in these situations.