Any rescue dog generally gets three names: one from his prior life, one while at the shelter, and then the new family generally changes the name again. It works out fine. As
JeannieK says, they don't really know it's their name in the existential sense - to them it's a verbal prompt meaning, "look over here."
I would also assume a dog named Sugar was a girl, but I think it's kind of a cool boy's name. It sort of reminds be of Elvis, or something: "come 'ere, Sugah". People ALWAYS think Thor's a girl, I guess he is just a very girl-y looking dog. He and Sugar can be metrosexuals.