Because garlic is only toxic in very large doses

It is a member of the onion family, certainly. But it is a very weak onion, and the amounts needed to reach toxic levels are well beyond that which any normally sane person would ever feed.
In small doses, however, garlic has a number of very beneficial properties - including as a natural flea/tick repellent. And a great many people do use it for that.
It
would however, be fair to add garlic as a substance that you shouldn't ever let a dog get into. Given the taste of raw garlic, it's hard to imagine that any dog is going to scoff down bunches of it. But you never know! So along with onions (which should never be fed, raw or cooked, even in small doses), garlic should be kept out of a dog's reach. And if fed, moderation is a necessity (like a clove or two per week tops).