Learning to code is quit easy, you can read the online documentation of python as example,
or any programming language.
Once you did it you will just be able to understand the basic logical, not to code.
To be a real coder you will have to write maintainable, clear and operational code.
The purpose of coding challenge are about the third point "operational code".
Some employers will be very aware about these websites, and could consider your score as a test to be hired... or not.
Whenever, I guess, we have to renew our coding style all life long, tools and languages change, be aware or what exist or not is a real need for a coder. I guess, we all can consider using one hour a month or even less to a such hobie.
There are so many I cannot list them all.
These tests should not be considered as a way to show you know how to code, for such purpose I recommand you to publish real projects on GitHub, they are more a train to hiring tests, or a way to solve problems we almost won't encounter in our projects. The visibility for such websites is not that high as your portofolio, just a part of it.