A rather common saying is:
“I'd rather be hated for who I am, than loved for who I am not.”
Should it not be “for whom”?
No, not really. To see what's going on, consider a couple of things:
(1) There's a relative clause that's been
reduced (made "shorter") by omitting the relative pronoun "that" and the antecedent "the person." The full sentence becomes
I'd rather be hated for the person that I am, than loved for the person that I am not.
(2) The void left by the reduced relative clause is then filled by "who," a pronoun
logically connected with the person encoded in "I." That's how we get
I'd rather be hated for who I am, than loved for who I am not. This sort of reduction happens rather intuitively; it's very unlikely that the speaker started by saying "first, I'm going to add a relative clause; then, I'm going to reduce it." It's just how things are.
So,
who is not the object of the preposition "for" (in other words, "for" doesn't govern "who").
Who is the pronoun that stands in for the relative pronoun "that" which was omitted when the relative clause was reduced.
There's reduction too in
I feel sorry for him who violates this rule, but things aren't quite the same as in your example. Here, it should be "him" because "him" is the object of the preposition "for." But "him" is not the antecedent of "who;" the antecedent is found in the relative clause that's been reduced:
I feel sorry for him, the person who violates this rule.
There are additional things to add:
It is I is "prescriptivism," where the sentence structure is modeled after Latin grammar.
It is me is "Standard English" (by "standard" I mean that this is simply how people talk, who intuitively know that English isn't Latin).
Prepositions assign case; what this means is that "whom," "him" and similar pronouns are used when they are "governed" by prepositions.
This is for whom? (question showing incredulity);
This is for him.
Whenever the pronoun
whom is separated from its governing preposition,
whom commonly becomes
who, particularly in speech. This is what usually happens when "whom" moves to the front of a relative or interrogative clause.
The man who we spoke to came by today (
The man whom we spoke to came by today);
Who did you vote for? (
Whom did you vote for?)
He wanted to know who I voted for (
He wanted to know whom I voted for). This transformation of "whom" to "who" upsets people who follow prescriptive grammar (they always use "whom"), but this transformation is part of English syntax; it's how language works. If you move the preposition to the front as well, then "whom" becomes the natural choice, because now the governing preposition and the pronoun appear next to each other:
The man to whom we spoke came by today; For whom did you vote?