The system naïvely assumes that the votes accurately reflect the usefulness of an answer (when, in truth, the votes only reflect the usefulness of an answer *as deemed by the voters*, and even that assumes the voters voted responsibly to begin with). So, since that answer had at least 2 upvotes, the system thinks the answer is useful and therefore awards it with the bounty.

To prevent this from happening in the future, one option is to post a self-answer with details on what *did* help you solve your problem, then awarding the bounty to your self-answer. You won't get any reputation back, but I suppose it beats inappropriately awarding reputation to an answer that, despite what its votes might suggest, was not helpful at all to you.