What comparison?
You said; "But saying the word is not wrong." - with regards to the N word.
Just because he has the freedom to say the word does not mean he has the freedom to spew hatred, which is what calling someone the N word repeatedly is, within the context of the directive of this thread. The OP didn't ask if someone saying the N word is bannable. He asked if someone repeatedly calling his friend the N word with intent to offend is bannable, and it is, because it falls under Hate Speech. It's not about "simply saying a word" and being surprised when someone gets offended. Especially when said word has carried a negative connotation for tens of years now and even more so when you're using it to offend.
If you're incapable of understanding why the word is offensive then you're morally inept - why else do you think it is explicitly banned from being used in ANY context in the entirety of the gaming industry? Find me any game company that doesn't harshly punish the use of the N word in ANY context, on whatever platform they use; forums, social media, in-game chat; and i'll retract my statement.
But it's fine if being a racist is a strong suite of yours. Now you know. Or perhaps it's your lack of empathy and comprehension...