Why does Ugarte trust Rick with the exit visas in Casablanca? Ugarte says,
You know, I have many a friend in Casablanca, but somehow because you despise me, you're the only one I trust.
What does he mean by this?
Ugarte was in a shady business, hence his "friends" were also likely shady characters. He couldn't trust them, because these friendships would not survive the temptation of profiting from the letters of transit.
Since Rick showed such clear disdain for him and his line of work, Ugarte reasoned Rick would not steal from him. The thinking being, if Rick despised thieves and hustlers, he was therefore not one himself, and hence the most trustworthy option.
I have a different interpretation from the other answer.
When you're someone with power, you always have friends. People that treat you well, and seem to enjoy your company. But you never know why they are actually friendly to you. It might be that they are just interested in what you can do for them.
Rick is also Ugarte's friend, as the two talk a lot and Ugarte is allowed to run his business at Rick's. However, Rick's disdain for him reveals his honesty. Ugarte realizes that Rick is still his friend despite his obvious disdain for his work, and an honest friend at that. His other friends might feel the same disdain, but don't show it because they don't want to offend the guy with power, just like employees kiss-ass to their bosses.