I agree with Katisha that the sentence makes sense, but it's awkward (at least as far as AE construction is concerned). I would also say, "why are dogs companions to humans/human beings?" However, I definitely wouldn't say, " "a dog is the best friend of a man"
I'd say, "A dog is man's best friend!" (that's the way I've always heard it expressed in AE).