Ever hear of disease? STDs are prevalent among heterosexuals. They, and many other diseases are almost the rule among homosexuals. Whole arrays of disease are prevalent in those that practice anal sex that aren't in those that don't.
The state has a legitimate interest in differentiating these behaviours and discouraging some - especially since many infected by these various diseases allow them to more easily become carriers of other diseases (Then there's the whole idea of public health-care).