@lisa1471,
I'm not a man, so I can't really answer "why" a man brags about having sex, except for my own personal thoughts......
He brags because, "he the man" well he thinks that he is, all that, and all... Scored.
Or, he brags, because he doesn't give a darn about your feelings, or your reputation see above.
Or, he brags because he thinks that you are easy, therefore, he's putting it out there, for his "mates" to acknowledge this and have a go themselves.
One thing is for sure Lisa, is that a man bragging about sleeping with you, is a man with no respect for you....
A woman has to choose wisely, if she wishes to purely have an encounter.. A woman also should not choose to have an affair with a married man.. The married man almost "always" remains with the wife and the "woman" or and the "wife" and the "husband" gets hurt.. One, or all... There is no other outcome.