On Monday, Zhang became the first Chinese woman since Li Na in 2013 to reach the last eight at the All England Club.
World number 50 Zhang defeated Ukrainian teenager Dayana Yastremska 6-4, 1-6, 6-2.
The 30-year-old will face former world number one Simona Halep on Tuesday for a place in the semi-finals.
But it could all have been so different had it not been for a chat with Stosur over dinner in 2015 when the going got rough.
"She's so special for me. Best friend on tour," said Zhang.
"We always, after the court, sometimes we eat together. We go to eat and we talk a little bit about not only tennis. Sometimes about life.
"She's such a nice girl, and she told me when I said I wanted to retire, and she really wanted that I keep going to play."
At the time, Zhang was 186th in the world rankings.
The chat seemed to work as just a few months later, Zhang reached the 2016 Australian Open quarter-finals, ending a sorry-looking 0-14 record at the majors.
"That got me to thinking maybe, okay, I'm going to the Australian Open one more time, one more try," she recalled of the chat with Stosur.
"I'm really, really happy I tried one more time, and also we won this year in the Australian Open doubles.
"So life is so nice to me."
Zhang memorably beat her Wimbledon quarter-final opponent Halep in the first round on her breakthrough run at the 2016 Australian Open, and has beaten her since in Beijing.
"We played her a few times before. I have some great memories from when we played, and also, my first Grand Slam win in the Australian Open, I beat her," said Zhang.
Halep has not beaten Zhang since their first encounter at Indian Wells in 2012.
"I think I can take revenge because she beat me a few times. It's a new challenge, its a big challenge," the Romanian said.
"I will try to fight till the end to win the match."
Before this year, Zhang had never won a main draw match at Wimbledon in five attempts.
But her 2019 run has included knocking out former world number one Caroline Wozniacki in the third round.
"Before the first win in the first round, I never thought I could make the quarter-final here, because before this year I never won any singles matches," Zhang said.
"Everything is possible now... I just try my best, because every opponent is very strong. And also, they play really well before at Wimbledon.
"Amazing week for me."
Wimbledon results on Monday (x denotes seeding):
David Goffin (BEL x21) bt Fernando Verdasco (ESP) 7-6 (11/9), 2-6, 6-3, 6-4
Roberto Bautista Agut (ESP x23) bt Benoit Paire (FRA x28) 6-3, 7-5, 6-
Sam Querrey (USA) bt Tennys Sandgren (USA) 6-4, 6-7 (7/9), 7-6 (7/3), 7-6 (7/5)
Rafael Nadal (ESP x3) bt Joao Sousa (POR) 6-2, 6-2, 6-2
Alison Riske (USA) bt Ashleigh Barty (AUS x1) 3-6, 6-2, 6-3
Serena Williams (USA x11) bt Carla Suarez Navarro (ESP x30) 6-2, 6-2
Barbora Strycova (CZE) bt Elise Mertens (BEL x21) 4-6, 7-5, 6-2
Johanna Konta (GBR x19) bt Petra Kvitova (CZE x6) 4-6, 6-2, 6-4
Elina Svitolina (UKR x8) bt Petra Martic (CRO x24) 6-4, 6-2
Karolina Muchova (CZE) bt Karolína Pliskova (CZE x3) 4-6, 7-5, 13-11
Simona Halep (ROU x7) bt Cori Gauff (USA) 6-3, 6-3
Zhang Shuai (CHN) bt Dayana Yastremska (UKR) 6-4, 1-6, 6-2