In the eyes of Whole Foods co-founder John Mackey, Jeff Bezos is a “brilliant man” — all because of a few price cuts at the grocery chain.

“What I like about Jeff the most, besides he’s creative and entrepreneurial, is he thinks really long term,” Mackey, who served as Whole Foods’ CEO from the brand’s inception in 1980 until 2022, told Fortune last week.

Whole Foods was struggling with declining sales when Bezos’ Amazon bought the grocery chain for $13.7 billion in 2017. It could have been easy to raise prices for an immediate revenue bump.

But for a brand long referred to derisively as “Whole Paycheck” due to its high prices, raising them further threatened to turn off customers. Shoppers were already looking elsewhere after larger, less expensive rivals like Walmart started stocking more organic foods to appeal to Whole Foods’ target customers.

Instead, Bezos came up with a long-term plan to change the economics of how the grocer operates.

He backed price cuts to avoid losing more customers four times, Mackey said. Bezos also pushed Whole Foods to cut down on inefficiency by focusing more on products with higher profit margins — a difficult task for any grocery business.

That included producing a greater number of products from Whole Foods’ in-house 365 brand, which Amazon also started selling online. Expanding the private-label brand allowed Whole Foods to lower prices while still maintaining a reasonable profit margin, due to lower production costs.

Amazon’s acquisition of Whole Foods has received mixed reviews from critics. The grocery chain controls roughly 2% of its industry’s market share, according to IBISWorld — less than some analysts expected following an acquisition by one of the world’s most valuable companies.

But the changes have helped Whole Foods’ revenue growth, as net sales from Amazon’s physical stores — Whole Foods locations are the vast majority — surpassed $20 billion last year, up from nearly $17.2 billion in 2019.

Perhaps most importantly for Mackey, the strategy shift by Bezos — who stepped down as Amazon’s CEO in 2021 — helped diminish the stigma of Whole Foods as a store with exorbitant prices.

“I hardly ever hear the ‘whole paycheck’ narrative any longer—that’s due to Amazon,” Mackey said.