Have not yet read the other answers, will do so after posting.
I don’t agree with it at all. There are plenty of people who are complete narcissists (or sociopaths) who absolutely adore themselves, and think they are extremely smart and wonderful, who treat other people like crap. I think it’s because it’s easier to treat people like crap, and if they can get away with it, why not?
Then there are other people who are kind, and smart, and compassionate, that treat people politely (as much as they can) but who take people as they come, and treat them accordingly. They might be kind, or curt, or they might avoid them at all costs. It depends upon how the person seems to them, and they treat them accordingly.
Then there are people, who are naive, and either think everybody is good, and they treat them accordingly, or they think everybody is bad, and treat them accordingly.
I don’t think people treat people a certain way, because of how they feel about themselves. They treat people in accordance of how they feel or perceive the other person to be. Even if their feelings, or perceptions are not accurate.