Six police officers walked into a Starbucks in Tempe, Ariz., on Independence Day, paid for their orders and began to enjoy their drinks near the entrance.

A customer who was “anxious, nervous or uncomfortable” seeing the officers asked a barista multiple times what the officers were doing there, a Starbucks spokesman, Reggie Borges, said.

“The barista said, ‘These guys come here all the time,’” Mr. Borges said on Sunday. “The barista repeatedly said, ‘They come here all the time. There is nothing wrong.’”

The customer, a white man, continued to ask about the officers, who were also white men. The barista asked the officers to move away from the area where customers pick up their orders, which was near the entrance, to relieve the customer’s anxiety, Mr. Borges said.