To show off to other men (and himself) what a stud the guy is, that he not only got this hot girl to have sex, but she let him film it. This is sometimes called “candaulism,” after Greek King Candaules who showed off his naked wife to an advisor Gyges, and then lost his kingdom to Gyges when the wife found out.
To get revenge on a woman, for breaking up with him and for hurting his feelings. Rather than admitting he has feelings and dealing with them, he lashes out and tries to take her down a peg. Some men cross extreme lines, "doxxing" the women and sharing name and identity information as well;
#3 To Be A Cool Guy
To be one of the “cool guys” that post such porn. There’s a lot of peer pressure in those kinds of online communities. They want to be cool, and they want to share their porn with other guys — guys who have shared their pictures with them. These men have a value of not just being a “taker” but to give back. It’s strange perhaps, to see that positive value involved here, where it causes harm.
#4 He Has No Idea About Being Caught Easily
Because the guy is an idiot and doesn’t understand how small the world has gotten and how easy it is for such material to get identified, and traced back to the woman.
#5 Because The Guy Is Angry At All Women
Because the guy is angry at all women, and he wants to take women down off their pedestals. I think this is rarer, but it certainly seems present in some of the highest profile revenge porn cases. Within the military, it is certainly worth speculating that some of these men were motivated by anger at women’s increased role and acceptance in the military.