I went to the Rite Aid across from my office the other day and found a slightly awkward situation: an impromptu bank line. A group of customers, rather than lining up behind individual cash registers, had formed one single line that fed all the cash registers, as at a bank or airport ticket counter.

It made me wonder about line management in stores and how much retailers actually think about the way their lines work. Could they possibly think about it as much as shoppers do?

Not usually. Caring about customer queues, it turns out, tends to go along with a general emphasis on customer service throughout a store. It's not likely that a perfect, well-run checkout solution will be found at a place that otherwise doesn't price its merchandise adequately or have enough help on the sales floor.

But there is a science, of sorts, built around retail lines and what works in different types of settings, and some retailers do plenty of research to try to get it right. Still, watching the naturally occurring single-file line pop up where it's not intended certainly suggests that customers and retailers may never really get in sync when it comes to this critical moment in a shopping transaction.

"The best way to help make those kinds of decisions is to do it from a fact-based, scientific retailing model and balance it with the art of retailing," said Janet Hoffman, a partner in the retail practice at the consulting firm Accenture. In other words, retailers can't just understand how lines work, they have to understand how their customers think.

And that just doesn't happen enough at most retailers.

The pop-up single line, however, does offer some interesting insight into shopper behavior. I've seen these lines form many times, often at drugstores but also at department stores and specialty chains. The dynamic is almost always the same.

It works like this: Two or three adjacent registers are open, and each has one customer being waited on. When another customer arrives to check out, rather than just picking a line to stand in, he'll just hang back to see which line opens first. Then, another customer with merchandise will ask that shopper, "Are you in line?" and queue up behind him. After that, other customers follow suit, and the line grows.

This self-imposed order can last for a while, but it's fragile, and the potential for frustration is high. When a harried customer rushes up to the checkout without noticing (deliberately or not) the long line going down the candy aisle, it leaves those in the single line shifting awkwardly, wondering what to say. Sometimes the single-file line dissolves immediately as shoppers pile up behind individual registers, jockeying for the quickest potential checkout.

This scenario suggests that shoppers inherently gravitate to what is considered, by many people, to be the fairest line system, a single queue to multiple cash registers. In fact, though, it's not about that -- it's about customers looking for the quickest route out of the store. The first person who hung back, and inadvertently started the line, didn't do it to be equitable but to preserve the option of going to whichever register opened first. It was all about speed.

The fact is, shoppers are intensely interested in their time and often approach a line with a eye toward minimizing how long they'll spend in it. Is that cashier fast or slow? Is there a bagger in that line? Is that person in line buying more than that other one?

So my hat goes off to Rite Aid for recognizing this and making a conscious decision not to set up bank lines in its stores. Company spokeswoman Jodi Cook said the chain had seen this phenomenon happen naturally and had conducted focus groups to assess its line structures. The bank line didn't measure up.

"We asked the focus groups about the bank line, how they liked it, would they like it in the stores," she said. "Their perception was that it's a longer line and they like the ease of identifying what line they're in. . . . It was very clear."

There is, after all, something sweet (if a little guilt-inducing) about picking a fast-moving line and getting out before the shopper next to you. But Rite Aid's decision is also grounded in logistics: A single line makes it harder for employees to easily assess when another register should be opened. When six people are in line? Eight people? Rite Aid's policy is that a new register should be opened whenever each register has three shoppers or more in line. "We even have a catchy phrase -- three in line, it's time," Cook said.

There is also the psychological impact of single lines, said one store manager. If shoppers come running in to grab one thing and see seven people standing in a single line, they may turn around and go back out, assuming the line will take too long. But they won't walk away if those same seven people are spread across three registers.

Yet other retailers make the opposite decision -- such as Borders Books & Music, which uses bank lines in its stores quite effectively. Sometimes those queues can get very long, but regular Borders customers know that the chain's lines typically move fast. Hoffman of Accenture said checkout lines are one area in which customers can be "trained." Shoppers pay such close attention to checkout times that they quickly learn which stores have efficient systems and which are cumbersome, then adjust their expectations accordingly.

But there are times, Hoffman said, when one line format simply won't work for a particular retailer, as happened to Best Buy. The consumer electronics chain hired Accenture to evaluate its "shopping experience," including the checkout, which had become a source of customer frustration and complaints, Hoffman said.

It turned out that Best Buy's single register lines were just not fair given the wide variety of merchandise sold in the stores. One shopper might get in line behind a customer buying a CD, while another may get in a different line at the same time behind someone buying a washing machine -- a time-consuming transaction that requires discussions about transportation and extended-warranty offers.

For any kind of retailer selling products with a wide variety of service needs at checkout, the bank-style line works best, Hoffman said, so Best Buy is adopting that system.

But many retailers simply aren't thinking so carefully about their customers' time and experience. In many cases, they are tackling the thorny issue of line management simply through improved technology, such as self-checkout lines or different scanner systems.

"They're working to simplify the transaction so when you scan the ticket it actually takes less time," said Dan Butler, vice president of operations for the National Retail Federation. "Hopefully there will be less of that irritation."

Certainly, technology is useful, but too often it's used as a solution in itself, rather than as part of a more substantial commitment to improving wait times. Retailers need to understand what shoppers already know: A cashier who's chatting with the cashier in the next lane moves more slowly. So does a supermarket line that doesn't have a bagger. In department stores, when an employee is responsible for restocking merchandise as well as operating the cash register, customers walk out because they can't find anyone to ring them up.

In the retail world, line management may well be considered a science, but it's not rocket science. A good checkout line should be about one thing only: moving customers out of the store quickly, even if doing so takes more research, better training and a few more employees on the payroll.

If you have a question, comment or concern about what you see when you shop, send an e-mail to sellingus@washpost.com.