For things that learn (humans, AI's-while-training), it's a useful exercise.
And things that play (humans), it's a useful diversion.
The sport gives you an incentive to learn a language, library, or algorithm more deeply and to discover new ways to think about how they work. It's very useful.