Do we expect others to think just like us? Maybe someone you rely on doesn't share your values.  That doesn't mean fate is cruel, it just means your expectations weren't aligned. Every Individual has different moral compasses. Some are ethical, some aren't. To avoid getting hurt, take things slow.

Humans tend to naturally trust others before trying to be friendly with them, but sharing too much creates hope.  Do you need to be so open that anyone can wound you?

The best possible solution to avoid this kind of hurtful situation is not to get too involved. Or try finding a balance, and take time to understand people before fully opening up—this "who is who" phase protects you.

Hold on! This doesn't mean becoming a closed book. I'm suggesting you take time to recognize people before completely trusting them. This "Who is what, what is who " phase protects you from getting hurt. Who is who? It's a question to keep in mind, not obsess over.  While some relationships can't be built on strict formulas, whoosh into trust often leads to pain. In professional settings, people might seem sympathetic at first, sharing your frustrations. But later, to gain favor, they might reveal this information to your boss and then act innocent. These situations are common! It's happened to me, and I learned to be cautious before further damage occurred. In your personal life too, do not just blindly get into something that later costs you your amity. 

Remember- It's better to take precautions than wait to get hurt before acting wisely. Always try and think, who is what, and what is who!