The character just confessed to the wrong person
Whenever a person is about to confess their feelings to another, for instance, it is a good idea to maintain eye contact, or else risk telling your confession to the next random person that comes behind you. When writing a love letter, forgetting to sign your name will lead to the person assuming the wrong admirer, or possibly even the wrong person picks it up. Even email is not infallible, at least in fiction (since unlike in Real Life, there will be no failed sending, and typing in email@example.com instead of firstname.lastname@example.org) will connect you with another person you know. This might also be an example of Laser-Guided Karma, as the person you accidentally confessed to might have actually been the one you were supposed to end up with. Of course, this isn't only romantic confessions, getting a personal secret off your chest also counts.