Didn't last 3 years, but did this for about a year and it is funny how a guy can keep coming back for sex. My guy was super flaky between hookups and it really irritated me. I did not want a relationship or regular contact but when you text someone, they should text you back. He would keep excusing his behavior but he never changed, he just said what he said to get to the next hookup. If it wasn't for me finally telling him this was not working for me and there was no point continuing it, well who knows how long he would have been happy with it.
The reality is that relationships are about emotional intimacy, not sex, so 3 years of sex with a guy does not qualify you two for a relationship. I think you can easily test out where his mind is at by telling him that you are not interested in FWB and is he ready to make this a relationship and see what he says. Even better, see what he does. If he doesn't ask you to be his girlfriend and start taking you out, introducing you to friends and family and treating you like one, well you have your answer.
Been there, done that. Like you, I asked ... "why does he keep picking up his attention when I stop giving it?" or "Why does he get all possessive if he sees another guy with me?"
Guys will take what's easy. With you, there is trust, him being able to share his feelings, I'm sure you do nice little things for him, etc. And of course, SEX! He doesn't even have to try other than giving you the smallest bit of attention and affection. They train us so we feel connected by serving his needs ... rather than a give and take.
Just stop. Stop giving. More than likely, if he has to work for your attention and affection, he'll go elsewhere. Usually these guys are going elsewhere anyway. Don't let this come to an end because he finds some girl he wants to committ to and suddenly has to force you out of the picture because she starts to catch on.