They’re either this or well built, intelligent, and filled anxiety over the impending collapse of the galaxy into a black hole. "What was that?! A small tear in the fabric of the space time continuum? Demons? Maybe the cat next door is finally going to murder all of us! Ok, probably not. But maybe I should bark at whatever it is just in case. "
Some of that is poor training, they bark at unknown things until you come, and then bark to back you up when you answer the door.
What you do it wait outside until they quiet down, then come in, or if you are answering the door move them away from the door before answering.
There’s probably somebody with better training methods.