the only person who can answer this is the guy.
good luck
The general rule of thumb is that even though you have both determined that your hook-up is casual and may not ever reach that zone of seriousness that you still maintain that respect of not hooking up with other people or chatting up others while together.
This is a tricky area for casual daters and fuck-buddies... they don't want the commitment, but at the same time they don't want to see you openly flirting with strangers and actively working on other potential hook-ups in their presence. It devalues them, and especially for guys can lead to jealousy issues. Even though you aren't 'together' in the relationship sense, if you are hanging out in a bar together, even as a group, it's probably assumed that you will both be going home with each other at the end of the night. When he sees you entertaining advances of some other guy, he moved in to claim his territory. He may have even read your ambivalence about the situation as you wanting/needing his help to step in and 'save you' from this other guy's harassment... until he realized the new guy had succeeded in putting his number into your phone and that even after the kiss, you continued chatting with the stranger.
Technically you don't know how he interpreted that situation. You might have seen it as innocent and that this other guy had initiated it without your request, but your 'friend' probably saw it as you collecting numbers and sex-buddies rather indiscriminately, and disrespecting him as it was done right in front of him.
I know... it isn't technically fair. Given the situation, you don't owe him fidelity or monogamy and you aren't technically in a relationship... but a lot of casual hook-ups like this end up eventually leading into something more. Many people state up front that they don't have time for relationships, but if the connection is compelling enough, it could lead to something. He may have been thinking along these lines until he saw just how "un-serious" you were about it by picking up the other guy in front of him (this may not have been what you were doing, but this is likely how he read things).
If you flip the situation around, you will probably be able to see it better from his perspective. If you had hooked up several weekends in a row and then one weekend while out, he was chatting with some girl right in front of you, and you watched him get her number, and even though you moved in to stake your claim on him, he still continued chatting with her, you probably would have felt somewhat pissed off about it. Even if you aren't in a relationship, you've been hooking up with him every weekend. He figured that deserved some measure of respect when you are both in the same room.
Personally I think that he may have been seeing potential for more with you, but after what happened, he has backed off and that's why you're getting the cold shoulder.
I agree with Olivia, above (except for the bit about "especially for guys it can lead to jealousy issues"). I've had the same experience with casual relationships where the woman got jealous (even if they apologized for it later). It's a natural thing, especially in a situation like the one you've described. It taught me to alter my own behaviour a bit, especially when in an ambiguous relationship.
I think Olivia's "rule of thumb" is spot-on. Throw in the Golden Rule as well - ask yourself how you'd feel in his position and act accordingly.
In addition, take a hint: Your friend didn't want to say "stop flirting with the bartender" (or "stop flirting with her, she's with me") directly, but noticed the flirtation and came over to give you both the message with a kiss. That should have ended the flirtation with the bartender. Since you allowed it to go on, you undermined the relationship. Yes, even casual relationships have boundaries. Some can be soft, with a lot of room to push the walls, others are more solid, but until they've been discussed, I like to think you should err on the side of caution, protecting your lover's feelings, especially if you like the person and are entertaining thoughts of it developing into something deeper.
Some people need more time to figure out how to fit someone else into their lives. There may be something they're getting over (such as a recent betrayal), and may not have wanted to burden you with it, or they may be busy, or emotionally unavailable. We all have our reasons for taking it slow sometimes. If he was trying to date again after a bad experience and had trust issues, then your actions would send him off in the other direction.
If you have an "open" relationship where you both acknowledge the fact that you'll have other partners, or a swinging lifestyle, that's one thing. But if you're sleeping with someone and out with them, it's just respectful to turn on the "occupied" light when you're out with them.
I've had very casual relationships in my past, and the ones that worked best were the ones where we respected one another and made it either as hot & intense or romantic and engaging as possible. I had a hard rule for myself (which still applies): When I'm out with a woman, whether it's a date or a friend, the flirtation sign is off. I don't look at other women, and try to keep my attention on who I'm with. If I need to look, there are other times when I can do that. When I'm a "free agent" I play the field discretely. I'd never chat someone else up when on a date. I've even had a girl that partnered with me in seducing other women...but those terms need to be in the open before they're acted upon in most cases.
It's like turning off your mobile phone when you're having dinner with someone: A sign of respect.
Now, in your defense, he should have been paying more attention to you. Well, live and learn. Take the lesson to heart, and move on.