I think it may be difficult for some people to understand how humans can become so attached to dogs. For me, it's about several things.
First, when I brought Nema home I made a commitment to be responsible for her well-being, so that's why I do my best to make sure she has plenty of love, the best food, a warm and comfy place to sleep, interaction with lots of other dogs and people, exercise, and training.
Second, people who get a dog and keep it chained up in the backyard or in a cage never get to experience how intelligent most dogs are. It's fun to watch them learn. It not only expands their world -- it also is fun for the human teacher.
Third, even if a dog is not particularly smart, almost all dogs (unless their behavior has been ruined by humans) will give you so much love and affection -- and isn't that what most people secretly want? They really can be a companion who can do what no human friend can do -- be there for you all the time, 24 hours a day, willing to spend all their time with you, no matter what. They'll walk with you, watch TV with you, go out anywhere with you, sleep on the couch or in the bed with you, and always love you.
Fourth, for me and Nema specifically, one reason I am so attached to her is because I held her in my arms when she was a little 6-pound puppy and have seen her grow up into an intelligent, active, sweet, and funny dog. I am always going to do my best to keep her safe and happy.