Only humans get "lonely."


And maybe dogs.


Typically, an animal that is not self aware does not know or understand an emotion you call "loneliness." There are only a few self aware animals; humans being the most obvious, bottle nosed dolphins, some apes, and maybe one or two more.

Emotions are generally not a factor.