Discrimination is problematic mainly because it is dehumanizing. If one person treats another one differently based on race, age or gender, then that person is denying the other their individual human rights.
The act of discrimination against an individual or group implies that one is able to know everything that there is to know about the individual or group in question; thus the personal acts of the said individual or group end up overshadowed by their associations. Discrimination inhibits people's ability to see the truth of another being. Prejudging people is a way of forcing them to fit into a narrow definition, which is based on personal opinion. This denies the person being judged a right to uniqueness and the one judging can then refuse to acknowledge them as human, based solely on their race or gender.
When one is judging another, they no longer have the need to discover the true motives and intentions of the other; this forms a barrier to communication, allowing for conflict. Communication is essential for two individuals or groups of different inherent properties to exist. This inability to rationally judge the character and/or actions of another individual allows one to justify acts of violence or hatred toward that individual, or the group they may belong to. In this vein, it can be said that wars, hate crimes and everyday malicious acts are products of unjust discrimination.