It is our innate instinct to trust.
When I meet someone from the beginning, I trust them, but this is different for everyone because naturally I'm a trusting person, mostly to strangers who I have not had the pleasure of knowing anything about, so if they come off as nice and trustworthy then I will learn to trust them by default.
Family members who I have grown up with and despised for quite some time have not earned my trust nor do I want theirs, but it is the complete opposite when it comes to my closest friends who I'm able to tell anything to.
Talking about past experiences, it has come to my attention that many people are untrustworthy, no matter how nice or respectful you are to them, people will just take advantage, get close to your kindness, and then backstab you because you were too easy and they didn't care. They were young. They were childish. It happens.
But... trust can also depend on the persons personality, the way they present themselves and how they act in front of you when you first meet. Usually people who are ghetto and loud, annoying and crass tend to push me away from talking to them, so it becomes a harder time of trusting those types since the way they act doesn't please me.
Interaction is key. If I can click with a certain person very well then trust can be very easy here, as they have the same interests as me and they know how I feel.
Attitude can go a long way, but if you want to act stuck up, snobby and arrogant then that can be a huge decline in trusting you.
In the end, time is the most important factor in earning and gaining trust. You can't just decide to trust someone with your life as soon as you meet, but once the relationship builds, you realize that you are on the same page, then you can start trusting those with everything.