The dog represents Bond and the hate/love relationship between him and M.
M feels responsible for turning Bond into the cold, detached (ugly) agent that he's become, and that, combined with the fact that he's so good at it, is why she refuses to let him go. Hence, why the dog is so ugly and why she insists on keeping it.
Bond, on the other hand, would rather be somewhere else, but, at the same time he feels that it's his responsibility to protect M (which is the reason why he returned from being "dead"). This is why he hates the dog, and why he'ld rather her threw it out. This is also the likely reason why the figurine is a dog and not something else. Just like a dog, Bond will stay by M's side until the end.
The dog surviving the explosion makes this even more obvious. It, just like Bond (and his relationship with M), seems to survive pretty much anything.
Leaving the dog for Bond is M's way of not only getting the last word in their never-ending quarrel, but also to remind him that, while he might be an ugly dog, he's UK's ugly dog (the fact that the dog is an English Bulldog draped in a UK flag indicates that it's not just about M, but the entire country), and they still need him despite that she's now gone.