When you meet someone who is potentially a new friend or love, there is something about them that you like and that draws you to them. You trust in your instincts and explore them further until they give you reason to be alarmed.
There is also a lot that people will decide to put up with in others that is far less than perfection. We all have faults and we will all have disagreements. There are deal breaker behaviors that we can only decide we can handle once they have materialized.
When you put your heart out there, most likely you get hurt on some level eventually. I guess when the bad far outweighs the good, that's when you move on.
Don't be so afraid of getting hurt that you avoid living life.
There's that expression "It's better to have loved and lost than never having loved at all".