SHORT ANSWER
It is likely that
LONG ANSWER
Somehow, I feel that the question is based on shaky assumptions:
That the "pets" relation is hierarchical in nature (with one member of the relation, typically the human, dominating the other, for instance a dog or a cat or a fish).
That we know of all symbiotic relations in "natural contexts" (when we mostly know about those in human culture, and only poorly those which do not involve humans.
That "escaping solitude" is a "need" (and pleasure) typical of humans, when it is likely to be one for any individual of any social species (as much as hiding from the sky for preys of birds of preys), in the sense that it was positively selected by the evolutionary mechanisms.
Basically, I feel (no offense meant!) that the question is a case of asking "why is it that objects A with characteristics B,C,D,E,F,...,Y always have property Z?". Concretely, if you define
- A = pets" such as having characteristics such as
- B="Dominated species",
- C=not (any more) for direct consumption (e.g. chicken),
- D=not (any more) for help hunting (e.g. dogs),
- E=not (any more) for help producing food (e.g. cows, goats,etc.),
- F=not (any more) for help producing clothes (e.g. sheep, cows,etc.),
- G=not (any more) for help keeping food safe from "vermin" (e.g. cats),
- (...)
you will have made your definition so specific that, of course, only the cases you have in mind (human's "pets") match, and the coincidence should not be a surprise.
The very same Hal Herzog cited in another answer mentions the cases of
- an American Sign Language-trained gorilla adopting a cat,
- a hippopotamus becoming friend with a tortoise,
- an elephant and a dog, and
- a group of a dozen or so bearded capuchin monkeys who were caring for a baby marmoset, another species of monkey.
Hal Herzog excludes the first 3 examples as "unnatural settings" (a flaky argument) and the last one as "the exception that proves the rules", an even flakier argument "whose meaning is contested" (especially with the modern meaning of the verb "to prove": it would be correct to say that "the exception *tests the general rules", but then the general rule must be discarded if it cannot be modified to encompass even the exception).
Alternately, if one was to define A (to avoid the word "pet") as "interspecies symbiotic relations between two members of distinct social species", Hal Herzog himself is giving instances of A which do not involve humans directly, both in the human culture (e.g. a dog and a cat sleeping together, a parrot and a turtle playing together) and outside of it (e.g. birds of other species peacefully sharing living quarters with a social colony of monk parakeets, parrots and monkeys being adopted into a colony of parrots and monkeys of a distinct species).
As such, I would make the research hypothesis that any member of a social species (not just humans), being isolated from its peers, will be searching for company, including from individuals from other species, "for pleasure". I would be curious to know the state of the art on such topic from an Ethological perspective!