(a) it's relaxing and pleasing to do something like typing out a for loop. The repetition with minor variation stimulates our brains just the right amount. Same reason why people like activities like gardening, cooking, working on cars, Legos, and so on. (b) it allows you to have some time to think about what you're doing. The "easy" part of coding gives you a bit of breathing room to plan out the next "hard" section.