New York (CNN Business) Starbucks wants to be the place you pick up your coffee and go, but also the place where you order and stay.

Competitors like Dunkin' Donuts have been focused on getting you in and out faster, pouring funds into drive-thrus, digital kiosks and bottled iced coffees.

Starbucks is embracing these concepts, too. CEO Kevin Johnson promised to expand the company's digital strategy when he acknowledged that over the past few quarters, the company has been struggling. Johnson hopes that mobile ordering and pay, among other things, will make customers more loyal.

But even as the company commits to digital growth, it is leaning into its identity as a third place to go after home and work.

In his parting message to employees, chairman Howard Schultz reiterated the message.

"Providing the world with a warm and welcoming third place may just be our most important role and responsibility," he wrote. "Today and always."

The third place helps customers think of their neighborhood Starbucks as just a friendly, local coffee shop and paves the way for more sales in the afternoon. And it gives Starbucks a distinct identity.

The third place helps Starbucks fight its image as a huge corporation. With 15,000 locations, some customers see the company as a threat to local businesses, and long for the personality of an independent cafe.

"Starbucks was becoming this big corporate machine and taking away from the little guy," said restaurant consultant Aaron Allen. The third place, he said, is one thing that helps change that perception and "puts that homey feel on it."

Starbucks stores are decorated in a way that invites people to stick around, notes Lee Peterson, executive vice president of brand, strategy and design at the retail consulting group WD Partners.

"It's actually easy to drive people out of your space," said Peterson, who has worked with Starbucks in the past. "You can have no chairs, you can have no music." But Starbucks invests in comfortable chairs and art to create a welcoming environment.

That atmosphere matters most in the afternoon.

In the morning, when Starbucks stores are busiest, "they would prefer for you to buy your coffee and leave," said Nick Setyan a restaurant analyst with Wedbush.

But later in the day, when business is slow, Starbucks may indeed want people to stick around.

There can be sales benefits to encouraging customers to stay, said Peterson. "The longer you spend, the more money you spend."

The Starbucks Reserve Roastery outlet in Shanghai.

Attempting to boost afternoon sales could also be part of the strategy behind Starbucks' investment in the Reserve stores and Roasteries, where consumers are invited to watch baristas make their coffee and, in some locations, order food and cocktails.

It also may be why the company was so quick to put in place a new policy called the third place policy — that allows people who haven't made purchases spend time in the store and use restrooms. That policy was announced shortly after two black men were arrested while waiting for a friend at a Philadelphia Starbucks.

"For somebody to say, 'You've been sitting here too long,' is really brand wrong," said Peterson. "Especially if your brand is all about being a third place."

Starbucks also needs the third place policy to set itself apart.

Peterson described the "third place" as more of a "de facto strategy."

"For a lot of people, a coffee shop is where you go and that's where you hang out," he said. But by formalizing that relationship, Starbucks has given itself an edge.

"They came up with the term third place," he said. "I think that's a wise translation of what they actually are."

Howard Behar, who joined the company in 1989 as vice president of retail stores and rose through the ranks before retiring, traces the idea for the third place back to the 1989 book "The Great Good Place," by Ray Oldenburg. In his book, Oldenburg points to the coffeehouse as one place where strangers can spend time together in a relaxed, enjoyable setting.

"We kind of went kicking and screaming into it," Behar recalled. But eventually they recognized that offering a safe and welcoming space made Starbucks "who we are."

"That's at the core of Starbucks," Behar said. "Starbucks without doing that isn't Starbucks."