Why do people act like they want to be in my life/act conflicted only to ghost on me?

My problem is that I keep experiencing losing people who DONT want to be a part of my life anymore but act like they DO. My first love was the perfect example of somebody who was confused. He would cry to me about his problems and I would always be there for him, I only wanted him to be happy but he would also constantly ignore me and wanted to stay broken up and just continue having sex after a while. I didn’t want that for myself and when I tried to leave he got emotional, but he seemed to want something different too. I legitimately felt innocent. Like I didn't feel like I had particularly done anything to hurt him. He was the one who kept hurting me which is why I felt like things weren’t working. But I loved him and if he said he wanted it to work then I wanted the same thing. Finally he ended up just ghosting and I hated him after that. Like that broke my heart so badly because if he hated me he could have not pretended to care? Why beg for a second chance when I tried to leave and convince me that he loved me? I knew I loved him so I’m the only one who ended up hurt. A short while later the same thing kept happening with a friend. I felt like I loved her and had been there for her and all she continued to do was find the fault in our friendship while totally disregarding WHY the friendship wasn’t working. For example, I missed her birthday party because I had to work but she took it as a huge offense. Another thing was that I rarely texted or called her anymore but it’s because SHE never responds. She would talk about me to a mutual friend and say how she felt left out of my life and then she eventually ghosted as well. One day she just blocked me on everything. I didn’t try to win her back I just let her go because I don’t need people like her in my life. She knows that my ex did the SAME thing to me and she wants to leave too? Because of problems that are easily fixable if she were more understanding? Why are people like this?
Why do people act like they want to be in my life/act conflicted only to ghost on me?
Add Opinion