Because "pela" is actually "por" + "a", which by the magic of Portuguese somehow equals "pela". If it were "Thanks for the dog", it would be "Obrigado pelo cachorro", since cachorro is masculine ("por" + "o").
It's a contraction, like "isn't" or "doesn't", except in Portuguese you would never say "por a", whereas in English it's OK to say "is not" and "does not".
pela is por ± a so you are actually looking for the difference between para and por and this helped me: http://www.learn-portuguese-with-rafa.com/por-and-para-in-portuguese.html
I believe it is because the article "a" is included in "pela" which literally means "por a". If it helps, think of it as kind of like a contraction in English (such as you're, it's, etc) but it is not optional whether or not you make the contraction. That's how I learned it when I took French in school, and it is over-simplified but can help break through the confusion.
Also, since the noun "colher" is feminine, it would not use "o" but "a" instead.
This is just what I have gathered so far, so if I am incorrect, anyone please feel free to correct me!
Yes you're right. Pela and other prepositions of this type are called "preposizioni articolate" (articulated prepositions) in Italian, and I am positive other Romance languages have a mirrored grammatical rule for this. You form these special prepositions by adding the base form of the proposition fot a certain logical function to the article preceding a noun. This is why pela becomes pelas if the noun is feminine and plural, for instance.