It’s not necessary for all individuals to procreate for a species to continue. Homosexuality is simply a failure of “normal” development. Sexual reproduction goes “wrong” an awful lot of the time.
Not necessary but that is the direction that nature programs species to do. In fact, it is the final goal of each generation. If one individual didn’t get the memo, the species will continue but the individual - for whatever reason - is effectively removed from the gene pool by genetic design.
Most of the men in prison and in the old sailing ships at sea who had sex with other men were forcing their will on weaker men/boys in the absence of women. In the ancient world, this was the normal way. Unwanted children were regularly exposed in the streets and if they survived, they were enslaved or went wild. Many of them became prostitutes since the average Roman only wanted to satisfy his lust with whatever object was available. Families and marriage regularized this lust and channeled it toward reproduction. What distinguishes modern homosexuality is how organized it is, so that its members are able to create a parody of the family and to convince a large number of people that the arrangement has some social value.