Starbucks is closing all of its La Boulange bakeries just three years after purchasing the pastry company for $100 million.

The decision came as a shock to some, considering Starbucks had initially planned to expand the 23-store chain to more than 400 locations within five years, according to La Boulange founder Pascal Rigo.

What they ended up doing was the opposite.

It's possible that closing the bakeries were part of Starbucks' strategy all along, Ad Week speculates.

With the closures, Starbucks now owns La Boulange's recipes — which helped drive a 16% increase in Starbucks' food sales in the most recent quarter — and it no longer has the burden of operating its retail outlets.

Darren Tristano, the executive vice president of restaurant consulting firm Technomic, told Ad Week that it wasn't clear from the beginning what Starbucks planned to eventually do with La Boulange.

"I'd speculate that it was their intention to go down the [expansion] path they indicated, but they likely failed," he said. "But if you look back to the beginning, it didn't really sound like we were going to see them growing La Boulange. It seemed like they were going to learn from it."

Starbucks would never admit to buying La Boulange just for its intellectual property, if that's even what happened, Noelle Ifshin, president of restaurant consulting firm 4Q Consulting, told Ad Week.

"But companies do that all the time," she said.

Starbucks says it's closing La Boulange's stores because they are "not sustainable for the company’s long-term growth."

"The La Boulange brand will continue to play a significant role in the future of Starbucks food in stores, and the company looks forward to serving delicious La Boulange food at its Starbucks retail locations in San Francisco and across the U.S. and Canada," the company said in a press release.

La Boulange's muffins, pastries, cakes and more were rolled out Starbucks' US stores after the coffee chain acquired the beloved pastry brand.

"After more than 40 years, we will be able to say that we are bakers too," Starbucks CEO Howard Schultz said at the time.

Not long after the acquisition, La Boulange's founder told the San Francisco Gate that nothing at La Boulange's retail stores would change.

"At our 19 locations, we get 10, 000 to 14,000 customers a day," he said. "We’d be stupid to change anything."

Now that Starbucks is closing the bakeries, roughly 800 people will lose their jobs. Starbucks has said it would help fired workers find employment at nearby Starbucks stores, where possible.