One of my bosses is a bit like this. It's not that he has a problem with any particular people, but if they're not directly involved in working with him, he just doesn't register them. If he ever has cause to visit my 'other' workplace (another section of the same department, in a different building), then he'll chat to me because he knows me well, and he's like it with others on the office whom he's worked with over the years. But there are three people in the office whom he just doesn't need to come into contact with for work purposes and so he just, effectively, ignores them. One chap really dislikes him for this reason and once even refused to go to a social event because that boss was going to be there.
Or it could be, as TTG says, he just fancies you. Just because he has a girlfriend doesn't mean he can't look elsewhere.