In the original Pre-Crisis / Earth-Two continuity, Mister Mxyztplk didn't choose a weakness. Rather, he needed to use magical words to transport himself from his dimension to Earth and back again, and 'Klptzyxm' was the word that sent him home for a time.
SUPERMAN: Then perhaps you'll tell me what strange manner of being you are—and where you've come from?
MXYZTPLK: The answer is absurdly simple. I'm not from this world, you see—but a being from another dimension! ..If the truth be known, my full-time activity in this other world was in the nature of a court jester. Therefore I had no business poking my nose into the secret volumes of a brilliant scholar.. But, inquisitive individual that I am, I couldn't restrain my curiosity. Thus did I learn the two magic words, one of which would transport me to this dimension. And the other word if spoken aloud would return me to my world for a time!
Superman Vol. 1 #30 (October, 1944)
In later stories set within the Pre-Crisis / Earth-One continuity, it was established that Mister Mxyzptlk saying his own declared name backwards -- whatever it happened to be at the time -- would send him home... unless his declared name was a palindrome, that is, in which case saying it backwards had no effect, since it sounded the same as saying it forwards.
In one story, Mxy had his name legally changed to 'Maxy Z. Toplik' and Superman tricked him into saying 'Kilpot Zyxam,' which forcibly sent him home.
MXYZTPLK: What? How dare you insult me? For contempt of court, I hereby sentence you, Mr.--Mr.--what is your name?
SUPERMAN (in disguise): Kilpot Zyxam!
MXYZTPLK: Very well! 30 days--Mr. Kilpot Zyxam! I'll show you--suddenly, I--I have the strangest feeling!
SUPERMAN (revealing his costume): You bet you have--since I just tricked you into saying your name backwards and you're going back to your own dimension!
MXYZTPLK: But my name isn't--wait! You did trick me! I changed my name legally to Maxy Z. Toplik... and backwards...
SUPERMAN: ... It's Kilpot Zyxam! I knew I'd catch you off-guard if I got you angry!
Superman Vol. 1 #96 (March, 1955)
In another story, Mxy had his name legally changed to the palindrome, 'Mxypyxm,' so him saying 'Klptzyxm' no longer sent him home, and saying 'Mxypyxm' backwards had no effect either.
In this instance, Superboy blew particles of an alien mineral called 'Amnesium' at Mxy, causing him to forget the previous 48 hours. Superboy was then able trick Mxy into declaring that his name was 'Mxyztplk' and into subsequently saying that backwards, which forcibly sent him home again.
An implication of this story was that Mxy still needed to use magic words to transport himself from and to his home dimension; without his memory of the previous 48 hours, he was worried that he wouldn't be able to get home, since he didn't remember what he'd changed his name to, and therefore couldn't say it backwards.
SUPERBOY: I thought you were behind the trouble...I suppose it was you who set all those advertising balloons loose, too?
MXYZPTLK: Hello, Stuporboy! But what balloons do you mean?
SUPERBOY: Those balloons!
MXYZPTLK: You mean...the ones with letters painted on them that read "kltpzyxm"?
SUPERBOY: What...the balloon trick I set up worked and you said your name backward, but it didn't return you to your own world this time!
MXYZPTLK: Because my name is no longer Mxyzptlk! I had it legally changed to Mxypyxm, and that'll be my name until I declare I'm Mxyzptlk once more! When I say my new name backward, it's just the same as it is forward...Mxypyxm! Ha, ha!...Let's see you trick me now!
Superboy Vol. 1 #120 (April, 1965)
In the Post-Crisis / New Earth continuity, Mister Mxyzptlk was a self-described "gamester" and "gambler" who liked to challenge people -- especially Superman -- to various games. In order to make those games competitive -- and thus more fun for Mxy -- the rules of each game had to allow for a condition by which his opponent could win.
In his first Post-Crisis appearance, he challenged Superman to a name game,
in which Superman had to get him to write, spell, or say 'Mxyzptlk' backwards -- i.e. 'Kltpzyxm' -- in order to win. Note that, in this continuity, Mxy didn't use magic words to transport himself from and to his home dimension, so him saying or writing 'Kltpzyxm' had no effect, in and of itself. It just meant that he lost the name game, per his own rules, and he promised he'd leave if he lost, so he did.
MXYZPTLK: You see, I'm a gamester, Superman. A gambler. And I think you can provide me with some of the challenge my own world has lost!
MXYZPTLK: Tell you what I'll do, Superman. I'll make this fair. I'll challenge you to the name game. All you have to do is get me to write, spell, or say my name backwards!
SUPERMAN: That's all, hm? Unfortunately, according to you, your name won't translate into any human tongue!
MXYZPTLK: True enough. True enough. But I do want you to have a sporting chance, Superman. So...let's make up a name! Right here and now!
MXYZPTLK: There you are, Superman! Mix-yez-pittle-ick!! From now on, I'm Mister Mxyzptlk!! Get me to use it backwards, and I'll return to my home dimension...and all the effects of my visit will vanish with me!
Superman Vol. 2 #11 (November, 1987)
In later Post-Crisis appearances, Mxy challenged Superman to new games where Superman had to meet other conditions to win, like getting him to paint his own face blue (Adventures of Superman Vol. 1 #441). He also challenged Lex Luthor to a couple of games, like one where Luthor had to get him to shave his own head bald (Superman Vol. 2 #31).
In his first few Post-Crisis appearances, Mxy always told the truth because he literally didn't know how to lie. It was only after interacting with Luthor for the first time that he learned the art of deception. In a subsequent game with Superman, he challenged him to best the Flash in a footrace, but the stated win condition was a lie; Mxy had only planned to leave if Superman lost the race, which he did, but not on purpose (Adventures of Superman Vol. 1 #463).
Later still, Mxy challenged Superman to another game, and refused to leave when Superman met the stated win condition.
SUPERMAN: I remember how this works--you set the rules. If I can somehow get you to do something you come up with, you'll voluntarily return to the Fifth Dimension!
MXYZPTLK: You reading off cue cards or what?? Okay, okay...here's the challenge--get my guards to spell "Mxcorp" backwards, and I'll oblige you!
SUPERMAN: Well? There it is--read it and weep! I know I'm not the only person who'll be happy to see you go back to the Fifth Dimension, Mxy!
MXYZPTLK: Hmmm... "Twister" went out of vogue years ago, Superdupe. I dare say this was -yawn- boring!
SUPERMAN: You set the rules--you gave your word... so leave already!
MXYZPTLK: This is so embarrassing. Don't you get it? That was--ta-da--my first lie! I guess the more you do it, the less awkward it feels when you get caught, eh?
SUPERMAN: You lied? How in the world do I get rid of you now?
Adventures of Superman Vol. 1 #496 (November, 1992)