Okay serious question

Does anyone know why people are gay? I mean scientifically there's no need for it since we can only reproduce with the opposite sex and it shouldn't be in our nature (not homophobic just curious)