It's a joke. When something bad happens to a person you don't like, you say "Well, it couldn't have happened to a nicer guy."
It's ironic, in short. He's not a nice guy, and it wasn't a good thing that happened to him. In fact, it's probably sarcastic, not merely ironic.
Student or Learner