One essential difference between cats and dogs in terms of their interactions with human beings is this:
Dogs recognize that we are a different species to them, and modify their body language and behavior and interpret what we do differently to the way in which they interact with other dogs.
Cats, on the other hand, either do not understand on some level that we're not cats, or don't care. Most likely the latter. They treat us like larger bipedal cats, and interpret what we do as if another cat had done it. In fact, there's some evidence that they think (or at least act) like we're very large, very incapable kittens. They bring us dead things (which they do to kittens as the "first step" to teaching them to hunt) and they vocalize to us the same way kittens do, in a far lower range than they do with each other.
If you're in a culture other than the "norm" of being a white, Anglo-Saxon male you will probably (at least subconsciously) change things like body language, word choice, inflection and topics of conversation to "adapt" or otherwise not draw attention to yourself. If you are black, especially female, there's usually a strong societal pushback to you expressing anger - people tend to stop listening to you even if you have every reason and right to be angry and just characterize you as a stereotypical "angry black woman".
But it's seen as yet another microaggression to a lot of people - that you have to modify everything about yourself in order to maintain the comfort of a larger body of people around you - especially ones who historically have mistreated people who look like you. The expectation to straighten your hair or not wear a style like dreadlocks because "ethnic" (read: black) hair is not seen as "professional". There's also the disturbing fact that prior to the civil rights movement there was an expected code of conduct of people of color, which included things like stepping out of the way of someone who was white and even stepping off the sidewalk entirely to let the white people pass. In that context, some see "code switching" as an extension of the idea that there's a group of people who are privileged and expecting that everyone stay in lock-step with their expectations.
You will sometimes see a Facebook post with a small red "100" symbol - a larger 1 with two smaller 0's, both of which are underlined. That's come to mean "Keeping it 100%", a term indicating that the speaker - at least in the context of the labelled communication - is NOT code switching, is staying true to his or her identity, and to hell with code switching.