I can't really see why you'd actually put in chat that you were hacking, joking or not. Maybe it's just me. Most people know it's against the rules and anyone can screenshot your messages and send it in, just don't bother joking about hacking and your problem is solved.
Some people may do it as a "smart" comment to get back at someone, like someone continuously calls them out for hacks over multiple games in their week, while I wasn't banned on MCGamer, I got called a hacker a few times and I felt like saying, "such big hacks aye", which would have been admitting to hacks, which would result in a ban.
Some people just joke around with their friends in clan wars.
It's usually just a joke, and I think MCGamer needs to make the punishment a bit less than what it already is, maybe actually letting the person know it's not best to joke about that sort of stuff as some people may take it as a real thing and use it against them.
Not sure, but it's just a strange thing to have because people will always joke about it