Why would a computer program get bored? I doubt we will ever create a 'real' AGI, simply because it's hard and has no human utility, but if we did, it would (hopefully) be designed to enjoy repetition and drudgery.
Why would it be interested in anything then? These questions assume that the subject emotion works on a computer level rather than on a level of intelligence model itself, which runs on whichever hardware available, be it of electronic or biological nature. We may as well ask how an FPS character can get tired of sprinting, he’s just a program. But it is not a correct question.
Next question is why would it have emotions, but that’s probably how something we could ever call AGI works, by definition. Maybe there is no way at all for something that we call “intelligence” to exist without a “boredom” and other basic drivers.