I mean in the strictest possible sense. Given that homosexual behaviour has been observed in almost all animals (and I say almost as any inference has to be based on an observation) that procreate (and by extension, are 'sociable') in species separated by up to 200 million years of evolution, then given that it presents itself across species then there must be a reason why it still does, even as animals have evolved.
That assumes you accept the evil "theory" of evolution.
Interestingly the ubiquitous presence of homosexuality in nature has proven to be a major problem to a lot of classically adaptationist evolutionary biology. It's clearly a trait with a long history in nature, but surely by its nature it should be selected against?
If it were a dominant genetic trait it would, but recessive traits or traits whose expression depend upon the environment can overall be evolutionarily favorable even if it decreases the chance of particular individuals to pass on the trait to their own offspring. Sickle cell disease is the classic textbook example of a recessive trait where one copy good, two copies bad. Similarly, the traits that lead to a high susceptibility to diabetes when there is plenty of food tend to give individuals who have them a better chance of survival when access to food is irregular.