Back in December you posted a thread here and caught a lot of flack for having interest in another man. At that time you could not understand why your husband would be upset with this, since you claimed this man was only a friend to you, but you did admit he was interested in you and thought you should leave your husband.
You say you were recently on the verge of an affair. Have you still been seeing this “friend” (which would undoubtedly make your husband mad)? If not, what was your H mad about?
Now you’ve lost your job and become dependent on your H, which is relieving his concerns about you becoming independent and leaving him for another man. Also, you declined to be picked up by other men at a bar, reaffirming you bond to H – good for you (though what you are doing in a place like that is beyond me!!) So H is attracted to you, shows his jealousy, makes you feel wanted, he feels wanted, and you go home and have sex. Now explain to me one more time what it is you are confused about? It seems pretty clear to me.