Because you care. That's why.
You care so much, more than you're supposed to. You wear your heart on your sleeves to every people you care about and it makes you vulnerable. It was like handing your fragile heart to them, surrendering it and giving them power to hurt you.
You don't give a thought about yourself when they're done with you, or if they grow tired of you. You cared so much you gave everything away including your heart, there was nothing left for you, you were so selfless that you didn't mind if they won't return the same selflessness.
So if you are hurting now, never blame them. It was you who gave them the power to hurt you. Know that people will not always give back what you have given. Learn to love yourself more, care for yourself first than others. It is not bad to think of yourself first. Learn to appreciate yourself, value yourself so they will notice your value too. Once they do, they will learn to appreciate you and they will see that you matter.
Loving yourself is the best feeling ever. You would know that all people may not like you the way you are but you love yourself anyway, and most of the time, that is the only thing that matters. Yes, it is nice to be loved and be appreciated, and it takes a really sincere heart to love you regardless of your flaws, so while waiting for that person, love yourself. Don't beg for love or affection from others. Let it come to them freely. Because a love being given willingly is ten times better than a forced one, and begging doesn't really show something about loving oneself. Know that you deserve better, someone who will love you without you putting much effort.
I am not saying that you shouldn't care. Go on and have concern for others but don't give too much of your heart while doing so. People will hurt you and disappoint you, whether intentionally or not. It is important that you have someone to love you when everyone else doesn't. And that's you.