Animals are the purest beings in existence. They have no morality, no evil, no hate. Their purpose is to live and that is a beautiful thing. We, as people, have an unreasonable complexity when it comes to our feelings, and with that comes all the negative emotions that stem from that complexity. In any case, it shouldn't make sense to you why people get emotionally attached to other people.
Dogs above all gave evolved to instintically love us unconditionally, and so did we. It's a wholesome connection. I'm sorry for your loss OP, hope you feel better after reading this. Hope this pape makes you feel better :)