It isn’t just about sex. It probably has a lot to do with your current circumstances and your history. Yes, you have the urge. You know him, so you know what you’ll get. I think that this is a fairly common arrangement for booty calls. You want something; he’s available.
Of course, you have to be concerned about what is going on underneath. Who broke up with whom? Could you be secretly hoping to get back together? Secret from yourself, I mean. Do you want to treat him like a piece of meat to get back at him? Are you trying to punish yourself?
If you have low self-esteem, you might feel like this is all you deserve. Or you may be lonely and figure this is all you can get. Or you might actually like his company (even if he is “crummy”) and figure this is a way to buy some time with him.
I don’t know. I’d have to interview you to even have half a chance of understanding your behavior. I doubt if even then I’d understand. You know yourself best. Why do you think you are doing this?