It is discrimination.
A gay man is no more likely to engage in risky behaviours then any other man. It is not the bad old days of bathhouses where homosexual men had to hide their behaviour from their friends, bosses, or even spouses.
Perhaps we should ban young people from donating blood.