Why do men flirt to make women jealous?

Mature men don't. It's not a good way to treat someone that you care about. If your boyfriend is doing that, dump him. There isn't any way to know if he's just trying to annoy you or if he's "trolling".
If it's your husband, let him know that you don't like it. If he keeps it up, both of you need to visit a marriage counselor.  

Answer

if in fact a man is flirting to make a woman jealous, then he is flirting to make her jealous. If your question is "why do men try to make women jealous?" The answer is because it's a way to mainrtain control over the woman. Most men know that what women fear most when it comes to relationships is the thought of another woman encroaching into their territory, so many men use that as leveredge to gain the upper hand in the relationship. Having the upper hand protects me from being hurt. I can't say whether the same is true for women. This behavior, albeit natural, can be very detrimental to the relationship. The best way to deal with it is to determine if the other person in the relationship is just trying to make you jealous, or if they are actually interested in another person. Either way, your response needs to be the same. You must communicate your concerns.