Many of us get to a point where we enter a relationship (of sorts) with an agreement of no strings attached. We often take this approach after coming out of a situation that left us hurt and wounded. The idea is to not let our feelings get involved again (too quickly) so that we can heal from last time. That would be perfect if feelings didn't have a mind of their own.
Adding to this is the fact that most are in "no strings attached" situations, but having sex. It's my belief that you can NOT have good sex without your body tricking your mind into thinking you care or feel something for the person at some point. (That actually may be a post for another day.) Because of this, one or both parties "catch feelings" and want more-- whether it be a title and/or commitment. If both parties catch feelings, that's ideal. If only one party catches feelings, it gets complicated. The feelings catcher starts to get possessive and imagine what could be if they "took it to the next level".
Now, you're in a pickle if you're the one guilty of catching feelings. You stay in the situation because feelings are there while constantly preaching to your partner to change. This is unfair to both parties involved because the initial agreement was NO STRINGS ATTACHED. Your partner sticks around in hopes of getting back to the initial set-up (because it was working out fine). They may even appease you a little and play along with the feelings game to keep you around. Some may even take it to the next level as you desire to keep the access to you. Now you're "in a relationship" for the sake of calming your flightiness, but he's most likely still operating as he was prior to your ultimatum. This is where they start to seem non-committal and "froggish".
Unfortunately, The truth is you created the frog when you went into the situation under the guise of "no strings attached". It's not as easy as creating a frog and waving a wand to change him into a prince once you decide it's not working for you. It's important to think carefully of who we enter these "no strings attached" agreements with (or just pray the sex isn't mind blowing).
Another way you could have inadvertently trained him to be "trash" is by downplaying yourself. Constantly placing yourself on the back-burner to his wants and desires will most definitely train him to do so. Make sure you speak up and let your wants and desire be known from the beginning. You may not want to come off as a nag, but you also don't want to give the impression that your wants/needs aren't valuable.
It's hard having a discussion well into your relationship about being prioritized better when you voluntarily placed yourself last in the beginning. Of course, he looks like a jerk regardless of the circumstance, but you could have set the standard higher in the beginning. Does his personality play a role? Of course! It's not ALL your fault, but we must stop giving "passes" in the beginning in attempts to come off ass the "cool girlfriend".