I have one super social kid who makes friends easily and picks up on social ques like a champ. And I have one kid with Aspergers. We have gone over and over the difference between being "polite" -- which is always required with all humans all the time, and being "friends" -- which is for people like.
Little kids don't get this distinction.
I agree that little ones often don't get the distinction. My dd is in K and she called one girl who wouldn't play with her or let her play with another girl her a "not a friend-friend"--in her mind people are either friends or not. I think the teacher saying that they don't have to be friends after school is probably confusing the issue.