I think it’s because both systems are bounded and cut out a lot of real world complexity, and since these simplified systems are easier to understand than the real world the certainty and confidence they provide become addictive. Similar to video games in that way.
It’s not necessarily a bad thing though because we’re always working with a simplified system whatever we’re doing in life, the question is just how much is it helping people. Chess provides entertainment and personal challenge, coding provides ridiculous productivity. All things in moderation though.