Sometimes you fuck up. You don't mean to, and you don't realize the repercussions of what you are doing. Maybe you feel so pushed away and worthless you look to people who you shouldn't look to for comfort. Maybe some sort of validation to prove to yourself that someone else can still want you. Even though it doesn't matter about anyone else in the world, in the end.
There isn't much you can do at this point. You have to live with the decisions you've made. If there is a lesson to be learned, teach yourself something from your carelessness.