This used to drive me nuts, and at some point a friend I was complaining about it to clarified that it's just something said to be polite. Because it's a nice thing to say. Which is frankly even more baffling because what the hell is so nice and polite about lying to people and pretending you want to spend time with them when in fact you don't? Why get people's hopes up like that? To which she responded with a surprised "You know, you're right. I've never actually looked at it that way." REALLY!? Never? But then she went on to suggest I was being oversensitive, because I'd always had such a hard time making friends. Well, yeah, okay... I brought it up to a couple other people, to confirm that this is in fact A Thing, and they said essentially the same thing. Ugh.
Anyway... deep breath. Rant over. Yes, people do this. Now when someone says such a thing, I just ignore it. Unless I really like the person a lot and genuinely think I would enjoy their friendship. Then I'll just call and invite them out first. Because every now and them someone really does mean it, and they're just shy about taking the first step, and even though it's scary and you might get rejected, it's worth it to make a new friend. And I have made a couple friends by doing this. So yeah, just because it's a thing, and you learn not to take it personally, doesn't mean you necessarily have to choose to participate