Dogs evolved from wild canines and were bred into a wide variety of species for their appearance or for special skills. Yet, they are inherently pack animals.
When I was young, dogs ran free in our neighborhood, forming small packs and interacting with us as we played in the yard or wandered into the woods. For a variety of reasons (sanitation, safety, property rights) that does not happen today. On the other hand, they are now allowed in stores, restaurants, gyms and airplanes, among other human spaces, under the control of their owner.
Unfortunately, most dogs in Western Society now lead rather solitary lives, often confined to condos or apartments for most of the day. Having not been socialized, they are defensive, reactionary creatures that must be tightly constrained or even muzzled when in public areas. While dog parks and dog walkers offer some socialization, these experiences are limited. Tiny breeds may do well indoors but, in my opinion, most dogs need plenty of outdoor space and at least one companion.