Direct discrimination is where, because of a protected characteristic, someone treats someone else less favourably than they would treat other people who do not share the characteristic.
Direct discrimination cannot be justified, except where the protected characteristic is age.
It is no defence to a claim of direct discrimination that both the claimant and the person alleged to have discriminated share a protected characteristic. And the motives or intentions of the person alleged to have discriminated are irrelevant; sometimes the unfavourable treatment may arise when they are acting with good intentions. Whilst some discrimination may be deliberate, much of it is a result of unconscious bias or prejudice, or is based on assumptions or stereotypes.
A worker experiencing less favourable treatment because of a protected characteristic does not have to possess the characteristic themselves. For example, the person might be associated with someone who has the characteristic ('discrimination by association'); or the person might be wrongly perceived as having the characteristic ('discrimination by perception').