Why can't לאו דווקא for "not necessarily" be used here?
I have the same question.
context. be-hekhrakh בהכרח is about a dog's need to bark (not all the time), while davka דווקא would be about whether a dog in fact actually barks (yes it does)
sometimes you can use both:
"the kitcken is not necessarily clean": https://forum.duolingo.com/comment/20225034
"the kitchen is not exactly clean": https://forum.duolingo.com/comment/25636341
So it looks like דיוק and דווקא are related. Perhaps דווקא is just the Aramaic version of the Hebrew דיוק?
Can the infinitive for bark be used here?
No, you can't use an infinitive here.
Is this some kind of proverb or something?
Haha. Yes. It's referring to the good ones vs. the bad ones that keep you up all night.
Why is "כלב לא נובח בהכרח" considered wrong?
You can't separate לא and בהכרח like you did. They are a fixed phrase and should be written together.
Why isn't לא בהכרך כלב נובח also right?
you misspelled בהכרח
I think a better translation is A dog doesn't automatically bark since בהכרח is "by compulsion."
I'm sure what they are intending to communicate, though, is Just because it's a dog doesn't mean it has to bark.