 In the examples, the topic is the dog (the "Indirect Object") and it is used as the topic to emphasize that the dog got the gift, nothing else.In context, a person may say this to you when you are confused about whom/what you should get the gift for.Perhaps there is a cat and a dog and the person clarifies that you got/get/will get/should get a gift for the dog (and not the cat).