I think boredom is a mechanism for novelty seeking, making us take a step back and maybe try a different activity, a necessary part of the exploration-exploitation tradeoff... because we never know what unknown unknowns we're missing. It's good to do what we know will give us rewards, but maybe there are even better rewards we're passing on, so from time to time it's necessary to sacrifice the safe zone and go out.
Interestingly, both curiosity and self-control have been turned into successful reinforcement learning techniques. A RL agent would walk a maze collecting points, but one wall was turned into a TV, so when it found it it stopped exploring and just binged on the video feed. Even RL agents can be addicted to video.