CBT approach and why we generate unrealistic thoughts
Another way to phrase these questions would be:


Why do humans feel fear and anxiety?
Why are humans particularly sensitive to potential losses See: https://en.wikipedia.org/wiki/Loss_aversion


In the broadest terms, the answer is that we evolved to have these mental characteristics because they probably gave our ancestors a survival and/or reproductive edge over their contemporaries. In the past, humans needed to be socially accepted in a small tribe; exclusion meant actual death as it was too hard to survive alone. Hence, we evolved to be hyper-sensitive to signs of social exclusion.

Your final question might be:


How come we can't control our feelings with our thoughts?


See the first point above. It didn't help us survive to be calm and at peace.