You can't stop a lot of things the world throws at you. Yes you can try to prevent it with safety measures, but that does not mean that someone or something won't be able to slip past everything you do. You can't stop yourself from getting hurt, you may not like what happens, but you can't stop it. People will try anything to stop from getting hurt, they'll put up metaphorical walls in their mind preventing anyone from getting in there and stopping anything from coming out. People do this to stop people from using it against them and it's mostly with information about their past. Our minds are like war zones, we all have our faults and some of them are bad, and giving someone that information could lead to getting shot down. Even for yourself, being alone with yourself with nothing to do could lead to a trip down memory lane, causing us to regret a lot of things and even begin to hate ourselves. It can be dangerous if you block everything off in order to stop yourself from getting hurt by either yourself or others. It may not make sense, but once you start to realize how messed up the world is and how people will do almost anything to bring you below them in order to feel superior, you then realize that you have to be careful. People doing this can lead to you hating yourself and hating what you have done. It's like trying to prevent the end of the world. You can't do it, there are always going to someone or something there to bypass any barriers you put up. It's just impossible. Be open with a few trusted people so you're not holding everything in, make sure you have a couple trusted individuals so you don't end up hurting yourself in the end.
You can't stop things from happening.