First, in all programming helps you become a better programmer, just in the same way as playing the piano makes you a better piano player. Even if you already know how to play the piano, you still need to put in the hours to improve (or even to maintain your skills). The more you program, the more parts of the act become total routine that you don't have to pay any attention to.
Of course programming contests or challenges might not be the optimal thing to do to increase your programming skills. But the comparison isn't to programming something else, it's most likely to somebody wasting time by playing a video game, reading blog posts, watching TV, etc. If a contest acts as a extrinsic motivator for somebody to program something, how can that be a bad thing?
In my experience it's incredibly common for someone learning a new language to lose steam quickly due to not having anything to write. We'll always give the advice of just writing some program they need. But amazingly enough many people just don't think of the world like that. To them a well structured problem set is just what's needed. It'll allow them to learn the new language, and learn something else on the side.
But you're also making the assumption that a coding challenge can't teach you anything useful which is blatantly untrue. I learned a lot about writing efficient data structures for a certain class of problems during the Netflix Prize. Likewise for solving some of the harder ITA software puzzles. I'd known the theory of stack smashing attacks on a very vague level, but having to properly figure out how to do (microcorruption) it was a completely different thing, incredibly fun and helpful. Likewise the Matasano crypto challenges -- learning to crack badly applied crypto made me acutely aware of ways in which I've badly applied crypto in the past.
I'll admit that there's probably nothing of practical value to learn from e.g. doing high level Perl Golf.