I would guess that on 50% of the interviews I have been on, I have been asked illegal questions. Generally speaking they are pretty innocuous when folks are trying to make small talk but they are illegal none the less.
For example, I was involved in potential lawsuit with former employer of mine for not hiring someone because she was married which came up in the interview when the woman interviewing commented on how she liked the candidate's wedding ring. Illegal comment/question by all means but she would have had a tough time making her case because she would have had to prove that we didn't hire her specifically because she was married.
Simply put, since it is pretty clear you need it simply put, you cannot ask a question that isn't related to performing the job. Whether someone is gay or not isn't related to one's ability to be a middle linebacker no matter what anyone else on team thinks.
Team chemistry certainly is a reason for not hiring someone. But not hiring someone on the specific basis that they are gay and that fact alone would disrupt team chemistry is not.