It depends on the context. Segregation or discrimination is not the problem, people who'd tell otherwise don't understand the importance or context and semantics.
A medical study might exclude some people based on their sex or race because of legit reasons, yet this is still discrimination. But with a founded reason, rather than saying "because we don't like black woman".
Discrimination on the basis of who or "what" someone is puts them in a position of exclusion over something they have (or almost have) no direct control over. You can't choose your color of skin, your race, having a disability or mental disorder, sex (not gender, and being trans is something else), nor your feelings about yourself (acting on these feelings is, but that's awhole nother story).
Not to mention when there is no direct correlation between the subject and grounds for discrimination. Being black doesn't make your a criminal, breaking law does. Being a woman doesn't make you less qualified for a job (by itself), your lack of skill or experience does. Being a politician for a party doesn't make your corrupt or bad, your actions do!
You get the point. Anyone saying discrimination or segregation on itself is bad and should be eliminated needs learn the importance of context, or (more sarcastically) be asked to eat everything rather than discriminating against other products, or life with the lions because these poor animals should not life their lives in segregation.