One of the most important things to every human being is validation. Because If you don't feel worthy how are you gonna cope with life and its disappointments, how are you gonna power through every obstacle that you might face! That's why the number one psychological need to humans generally is belonging, because it's almost impossible for anyone to be validated and feel worthy without belonging, as in this life we mostly validate each other.
The more you are validated, the more you feel worthy. And the more you feel worthy, the more you are confident.
Confidence like any other quality can't be owned without reason; you can't be confident without feeling worthy. You can't be confident or even fake confidence without knowing what confidence is, or at least were confident once, It's IMPOSSIBLE!! And this is exactly why when you see a confident person you generally get more attracted (mentally or emotionally) to him than others, because you would know for sure that he has something to offer and that he's worthy.