“Preference” is a weird word for homosexual behavior in the animal kingdom. Be assured though, many species engage in homosexual acts. Constantly. In some species, such as bison and giraffes, the vast majority of all sexual acts are homosexual.
Modern understandings of this behavior point to several factors, just like in humans. Some animals just have high sex drives and aren’t burdened with puritanical busy bodies telling them that they can’t have fun, so they just do it. In other species, the dominance/submission roles between males support group dynamics are a necessary part of overall group survival. Some species have no homosexuality, some have only male/male or female/female, and some have both.
Homosexuality in young chimpanzees is so prevalent that some researches have gone as far as to suggest that chimps go through a homosexual “phase.” To chimps, homosexual acts serve some developmental role.
And bonobos, don’t get me started about how they use all forms of sex to support group cohesion.
So yes, there are animals that engage in homosexual acts, and there are animals that partner for life with members of the same sex for life. There isn’t one single way of looking at it, just like in human homosexuality. Nature? Nurture? Both, really.