Cobb's distrust of Tusken Raiders, and the subsequent tense meeting in The Marshal, stems from how he's spent most of his life as mayor of Freetown dealing with attacks. These have originated from gangs, crime syndicates, and Tusken tribes. Eventually, the two parties learn to work together. While they might not see eye to eye, open communication goes a long way.