Ugarte's a shady character in Casablanca trying to make a buck—well, a lot of bucks—selling exit visas to all the refugees waiting to get out. Ugarte doesn't have too much time to make an impression. We see him chatting with Rick just long enough to pass off the letters of transit, basically, before he's arrested on the order of Captain Renault and then quickly executed by Strasser's men. So he isn't around for long, but he makes a brief splash before heading off to sleep with the fishes.
He never admits it to Rick, but Ugarte either murdered those German couriers himself, or else paid someone to do it for him in order to get hold of letters of transit to sell. Yeah, they were Germans, but they weren't military officers; they were mailmen, more or less. So, while he seemed like a friendly enough guy in his conversations with Rick, we don't shed too many tears for him after he's offed by the Gestapo.
At least he went out on a win. That roulette table seems to be awfully good to people.