I don't know how old you are, but discrimination by race used to be legal and much more prevalent. People still need the Fair Housing Act. Remember Donald Sterling? He's been rejecting tenants based on race before today's college kids were born.
A lot of black comedians have similar jokes about performing rituals to be accepted by whites. For example, Aries Spears says white women only date him after they hear him sing to 80s rock songs.