You will study other people's code on the job and code reviews provide coaching.
Chess is much harder for me because I don't have the discipline to study like that.
With coding, I can read a quick blog post or follow a tutorial, then immediately start incorporating ideas into my work.
In chess, if I study something, I might not encounter a situation where I can use that knowledge in game for a while. I don't get that immediate reinforcement so I forget things much easier.