The very last thing they did, or rather tried to do, before their deaths was kill a bunch of people who they knew where way weaker than them and didn't even need to be killed.
He could have used his magnetism to pull them away instead of into him, but no, he just had to vaporize all of them.
So again, he absolutely deserved being KO'd/killed by Shanks.