Attentional lapses have been found to impair everything from basic perception to learning and memory. Yet, despite the well documented costs of lapses on cognition, recent work suggests that lapses might unexpectedly confer some benefits. One potential benefit is that lapses broaden our learning to integrate seemingly irrelevant content that could later prove useful–a benefit that prior research focusing only on goal- relevant memory would miss. Here, we measure how fluctuations in sustained attention influence the learning of seemingly goal irrelevant content that competes for attention with target content. Participants completed a correlated flanker task in which they categorized central targets (letters or numbers) while ignoring peripheral flanking symbols that shared hidden probabilistic relationships with the targets. We found that across participants, higher rates of attentional lapses correlated with greater learning of the target-flanker relationships. Moreover, within participants, learning was more evident during attentional lapses. These findings address long-standing theoretical debates and reveal a benefit of attentional lapses. That is, they expand the scope of learning and decisions beyond the strictly relevant