But it's not just a need to belong that pushes older people to prejudice.
In some, the insecurities brought about by ageing lead to self-hatred that is then directed at minority groups, according to psychotherapist Dr Allison Abrams.
"If you don't like things about yourself, it's a lot easier to project that onto others than to look at yourself … Especially if somebody has low self-esteem or has a lot of self-hatred," she said.
When older people make inappropriate comments, their behaviour is often excused with the understanding that they are "from a different time".
But psychologists told Business Insider that growing up during the times of segregation is only part of the problem.
Dr Abrams point out that research has shown people who grew up with racist attitudes have the capacity to learn to overcome them.
Instead, racist remarks made by older citizens may be due to a shrinking of certain parts of their brain, she said.
Research from the University of Queensland, Australia, showed the frontal lobe – which is involved in regulating our thoughts – gets smaller as we age.
This means elderly people may lose their ability to censor inappropriate thoughts, making them more likely to vocalise offensive viewpoints.
"They may have said them anyway, depending on their personality when they were younger," said Dr Abrams.
"But for the most part, they probably wouldn't have … Once we reach that old age where our brains start to lose that ability, those more hidden parts, those more subconscious thoughts, we are less able to inhibit them."