Why is he mentioning my sex life?

He is a friend of mine and we were talking on the phone. I said that I'm sick as a dog. He commented that I should ask my husband to f... k me well, give me a shot, and I'll be as good as new. It sounded passive-aggressive and I didn't respond to it. I changed the subject.
He is like that from time to time. Why? Is he jealous, or is he just trying to hurt my feelings? Why does he need to bring my husband into the conversation and always in a bad way?
When I ask him to stop it, he does, but eventually starts it again.
He is married too.
Why is he mentioning my sex life?
Post Opinion