anyway.
for what it's worth, I think it is determined by hormones
i'm no expert, but most things seem to post towards that
ie. transsexuals have been known to change their sexual orientation when they start taking hormones. for example, someone who's born female and takes testosterone, could originally have been attracted to women, and then starts liking men as well.
also the argument a lot of religious people use, about how identical twins can have separate sexualities even though they're identical. they use that to try and prove that it can't be biological. but even identical twins don't share the same umbilical cord, so they're both subject to different hormonal environments in the womb.
i dunno about a biological or evolutionary benefit, but i think overpopulation is the most likely.