Some friendships are automatically temporary. Like the parents of other kids in your child’s class. Many friendships are also transactional. Like ones you make as adults at work. Even many romantic relationships are - transactional or just convenient. And that also undermines them.
Not to mention people have no time to sustain real friendships when they have kids and then they have no energy to maintain friendships after. So older friendships start to fade away in adulthood and lose their strength. And saying hi to neighbors is all you have left in the end.
I don’t know what the fix is but I think part of it is just the continuous lack of time for ourselves after we enter the work force.