Diane Abbott is in the shadow cabinet because her political views align closely with the Labour leader's views (more so than the majority of the party's Mps) and because she has shown loyalty to the Labour leader when the other party Mps tried to force him out.
Black women have been highly underrepresented as Mps and in the cabinet, being a black woman is not a path to easy street, white people who tell them their achievements are down to 'colour' is one of the extra obstacles black women need to overcome to achieve political ambitions that white men never have to face.