The major reason is because you say they do. Our brains are powerful and the placebo effect is real. Some doctors are even prescribing placebos, telling the patients "a number of studies have shown that this pill will help you" (which is true.) If a parent says something will work, it will work.
When my daughter was a preschooler her body reacted a lot to things others don't notice. One bug bite would swell her hand so she could barely use it. She was allergic to Solarcaine. I would tell her "tell your hand to stop swelling now" and she, not knowing that was a ridiculous request, would comply - and the swelling would go down. To this day "a warm cloth" and "a cold cloth" (a regular facecloth with water from the appropriate tap, squeezed out so it doesn't drip) are remedies my young adults will turn to when needed. These things help them to feel better, partly because their whole lives they were told that they would. (And partly because they genuinely do help for some maladies eg a fever is improved by a cold cloth and a bump is soothed by a warm one.)
On top of that, even adults who no longer believe in the power of a kiss from a parent do feel happier when someone acknowledges their pain, the more specifically the better, and expresses a wish for that pain to be lessened. It's true of emotional pain and it's true of physical pain too.
BTW, if you don't want to kiss the exact injury site (butts don't scare me, but maybe a scrape is oozing and gross, or a bump is very sore) you can blow it a kiss, or kiss your child's hand to let them deliver the kiss themselves. These also work as long as you are confident that they will.