Often it depends on the situation. Men, unlike women, are better able to separate sex from love, and generally speaking many guys have high sex drives, so a quick shag without any real emotion behind it is pretty commonplace. It's like scratching an itch, and yeah I guess there's something of a bravado element to it because society deems men as "stallions", so it becomes a competition as well as an urge. Think of lions fighting over a female - same sort of thing really. If you get one up over your peers you're considered more of a stud.
On the other hand, if a guy is in a serious relationship, a lack of sex within that relationship genuinely makes the guy feel as though there's something wrong between him and his other half - that he's being pushed out for some reason. In those cases, there's definitely a serious matter going on. Guys are very...tactile. Physical love within a serious relationship is important to a man - it makes him feel wanted. Denying a man sex is definitely a real ego kick and then you end up with a grumpy uncooperative man, who genuinely feels as though his other half doesn't love him any more. On the other hand, having a healthy regular sex life within a serious relationship and the guy feels happy, wanted, loved, and in turn responds accordingly and the woman finds that the guy is more helpful around the house, more cheerful, more romantic and thoughtful, and so on. Sounds very anti-feminist or whatever - 'keep your man sexually satisfied and he'll treat you well', but I suppose very basically put that's kinda how it works - psychologists have done studies on it, and in most cases it seems to be that this is the case. Not that I would suggest that a man has the right to turn into a dick if you don't want to put out, he might very well not, but he's going to be feeling wounded at least, just like a woman would feel wounded if her other half was unthoughtful in some other way.
Note I'm definitely generalising a bit, but more often than not you get one or the other situation above - depends if the guy is in a relationship or not. Not in all cases or for all people or not, but GENERALLY.