It's not your job to "make" anyone stay...or do anything for that matter. You control only what you do, and you alone. I wish it were different, but this is true for everyone and it's something we all have to accept. When people leave, though, it's not necessarily because you've done anything wrong. We look for explanations to these types of events because it doesn't seem fair that they happen to us, but sometimes things just happen because they happen, and it has nothing to do with you. Maybe it has something to do with them. Maybe it has something to do with something else. We have no way of finding out which...and blaming it on ourselves just makes us feel like shit and perpetuates the cycle of negativity. As for an explanation, "not being good enough for one" implies deservingness - that is, we believe that we "deserve" an explanation. Except there's no such thing as deservingness. Not really. Whether or not we "deserve" something is all in our heads, and what's in our heads isn't necessarily reality.
Moreover, think about a time when you wondered something along the lines of: "Why didn't X give me an explanation for why they did ______? They most certainly should have." I'm sure this is something we've all pondered at some point or other; I know I have. Now, attempt to think a bit more realistically about the issue. Was X the type of person who would normally have provided you with a coherent, logical explanation for their behavior? 90% of the time the answer to such a question is "no". And that being the case, doesn't it then follow that X, in fact, SHOULD fail to provide you with a logical explanation for said behavior? Pretty much. If someone behaves a certain way on a regular basis, it makes perfect sense to expect them to keep doing so. It results in a lot less disappointment to try to view things from a more scientific angle.