Being good doesn't necessarily amount to being appreciated. People tend to appreciate more when your action is in their favour whether good or bad.
Like you said, seeking appreciation or recognition shouldn't be the aim but rather being oneself in a positive way regardless of expectations from people
RE: Struggle for Acceptance