Misery loves company
Sounds about right. Get a pet for the right reason.
Being lonely can justify getting yourself a pet, as long as you remain well aware of the responsibilities that come along with having one. If anything, humans are still the perfect companions. A pet cannot just be a substitute, it is just not healthy.