Some men will do this in a manipulative way: they will consciously acknowledge to themselves that the relationship is a dead end, but act like everything is fine in order to continue in a fun or exciting or comfortable situation. More commonly, however, men will simply enjoy the relationship or the interaction with you, and will sub-consciously allow themselves to be more free with their affections or emotions or compliments, because they know in the back of their mind that they will never be forced to prove them by committing to you.
This isn't always the case, and your intuition is probably a strong guide in judging whether it applies in your case; but that intuition will be stronger still after understanding that this kind of behavior is a possibility, and recognizing the following ways in which this phenomenon can manifest itself:
1. Long Distance
This is probably the most common one. When a man is in another city or country, the pressure is off. He might not be cheating, but he is automatically expected to see you less, call you less, and generally be less involved in your life. Even though there is no impediment to him calling frequently, as he would if he were living down the street, it isn't expected of him. I've never been in a long distance relationship, but a few times I've kept in touch (for several months) with girls that I've met while traveling, so I know what this freedom feels like, and how low-investment those relationships are. The fact is that, if you are in different cities, you aren't on his mind anywhere near as much as you would be otherwise. When you are in the same place as a man, you occupy his thoughts frequently because there is always a possibility that you will be able to see each other soon. He is constantly entertaining this possibility in his mind, weighing it against other options. Even if you don't see each other as much as you'd like, he is still forced to think about that possibility (and therefore you) far more often. You are much more immediate to him. But when you are dating long-distance, there is no possibility to be together, and he mentally "shelves" you - that is, he makes you less of a priority in his life - because he knows that physical intimacy is not possible (and I don't only mean sexual intimacy). So a man in a long-distance relationship can put in far less effort to maintain the same level of commitment from you.
4. Your Relationship
You might be dating a guy that you are only semi-enthusiastic about, or thinking about breaking up with. Or perhaps you are married but unhappy. And there is a hot, single guy in your life that gives you a lot of attention. In fact, you are sure that if you weren't tied up, he'd be all over you. Think again. Men often allow themselves to enjoy the flirting, the sexual tension, the affirmation of your attraction and all the other makings of a courtship when they know that there is no pressure on them to follow through. They might not be attracted to you enough to make a move, but they will allow themselves to engage in the fun parts of the exchange because they know they will never have to. This is essentially the same mechanism as described in the previous point, except that it is a little more risky for the man, in the sense that he isn't in control of whether or not you end the relationship that is "preventing" something from happening between you and him.
6. Religious or Cultural Differences
1. Men Don't Have Commitment Problems
2. The Analogy Between Sex and Commitment
3. The Dynamics of Dating Shy Men
4. Don't Let a Guy Waste Your Most Eligible Years