I've always loved the quote "be kind, for everyone you meet is fighting a hard battle." And manners/niceness are a form of kindness. I go out of my way to kind and polite to waiters, shop assistants, postmen, etc, even if they're miserable and unfriendly. I always think "well, for all I know you're like that because your mum is dying of cancer, or your partner is having an affair...or whatever." You just don't know.
More generally, kindness/niceness IS a good thing. And I do believe that you generally get back what you put out into the world. We all create the world we live in. It's no good complaining that people are spiteful and rude if you're not very nice yourself.
But...some people are assholes. There's no getting around it. And such people despise niceness. They see it as weakness/soppyness and take advantage. Unfortunately, a lot of assholes pretend to be nice themselves in order to get what they want. I've watched this numerous times – horrible, vicious people with zero empathy pretending to be sweet/to care in order to get something out of someone (sex, money, etc). I know an attention-seeking narcissist, for example, who went door to door with his kids during lockdown asking the elderly if they needed help. Now this person (who I know well) could not have cared less if every old person in the village starved to death. He did it because it was an opportunity to show off and take photos (which he then plastered all over Instagram and Facebook).
Thankfully, humans are pretty good at spotting a fake. It may take time, but they get there. The silliest thing ever said is "I treat everybody the same". Don't. Be nice to the nice people, be cold and distant with the assholes.