You confide in people you trust, you tell them your deepest, darkest secrets, and through that, you build your relationship further. But let’s go back to the beginning of it all, before you told them your secret.
You don’t simply tell people you think are going to blab your secret out to the world your most confidential thoughts. In a relationship where you are ready to confide in someone with your musings, you already have a relationship built with them. For instance, I’m not just going to walk up to some random man on the subway and tell him that I have this huge crush on (insert name here) and he is so dreamy! Mostly because there aren’t subways where I’m from, but also because I have no connection to that man. In more cases than none, you typically tell your secret to someone you have a very strong relationship with. In the same way that you don’t share your political standing with a lot of people, secrets and meant to be secrets for a reason–if the spill, people question it, people patronize it, and people’s feelings get hurt.
If you promise to carry someone’s secret to the grave and (drum roll) actually do it, your relationship automatically becomes five bajillion times stronger, simply because it shows that you respect that person’s wishes and views and do not feel the need to share it with the rest of the world.