As a recent duplicate brought this issue up again, I want to give a more complete answer.
The purpose of a bounty is to provide advertisement for a question. That is what you are paying for in terms of reputation. Similarly, awarding the reputation to one of the answerers exists to provide an incentive for them to provide answers. An incentive beyond the usual incentives that exist on the site.
However, the OP is a special case. Why? Because the OP already has an incentive to seek out an answer to an unanswered question: they have a problem that needs solving. That's why they asked the question to begin with, and that's why they put a bounty on it.
Awarding them back their bounty for successfully doing the thing that they were already going to do is not really providing any special incentive.
Ultimately, the bounty system is a way to incentivize others to help you. That is its purpose; giving you the bounty back if you managed to help yourself does not make the system better at this purpose. You provided an incentive, but your actions later rendered that incentive moot. That's fine, but you don't get to get it back.