The official novelisation gives us a nice overview of the thought process that led to them going outside. There's a small amount of additional dialogue, but basically this agrees with the film.
Wuher (the bartender) was the one who suggested they leave.
“We don’t serve their kind in here,” the glaring form growled.
“What?” Luke replied dumbly. He still hadn’t recovered from his sudden submergence into the cultures of several dozen races. It was rather different from the poolroom behind the Anchorhead power station. “Your ’droids,” the bartender explained impatiently, gesturing with a thick thumb. Luke peered in the indicated direction, to see Artoo and Threepio standing quietly nearby. “They’ll have to wait outside. We don’t serve them in here. I only carry stuff for organics, not,” he concluded with an expression of distaste, “mechanicals.”
Ben was otherwise occupied and played no part in the discussion.
Luke didn’t like the idea of kicking Threepio and Artoo out, but he didn’t know how else to deal with the problem. The bartender didn’t appear to be the sort who would readily respond to reason, and when he looked around for old Ben, Luke saw that he was locked in deep conversation with one of the Corellians.
Meanwhile, the discussion had attracted the attention of several especially gruesome-looking types who happened to be clustered within hearing range. All were regarding Luke and the two ’droids in a decidedly unfriendly fashion.
Luke didn't feel he had any other choice and his leaving with the droids might have attracted more attention, not less, as he'd be singled out as a 'droids rights activist.
“Yes, of course,” Luke said, realizing this wasn’t the time or place to force the issue of ’droid rights. “I’m sorry.” He looked over at Threepio. “You’d better stay outside with the speeder. We don’t want any trouble in here.”
“I heartily agree with you, sir,” Threepio said, his gaze traveling past Luke and the bartender to take in the unfriendly stares at the bar. “I don’t feel the need for lubrication at the moment anyway.” With Artoo waddling in his wake, the tall robot hastily headed for the exit.
That finished things as far as the bartender was concerned, but Luke now found himself the subject of some unwanted attention. He abruptly became aware of his isolation and felt as if at one time or another every eye in the place rested a moment on him, that things human and otherwise were smirking and making comments about him behind his back.