'The Good Doctor' Season 3 Ending Explained: Who Died and What It Means for the Next Season

The Good Doctor Season 3 finale gave the ABC series a huge shake-up, with two cast members confirmed to be leaving, another character considering departing, and a new couple at the heart of the show. The episode, titled "I Love You," showed us the after-effects of the earthquake in the previous hour of the show. This quake left Dr. Neil Melendez (Nicholas Gonzalez) with some serious internal injuries sustained when a brewery collapsed.

Though his new love interest Claire (Antonia Thomas) tried to save him on the operating table, they discovered he had gone into irreversible septic shock. This meant there was nothing that could be done except to say goodbye to the character.

Speaking to Entertainment Weekly, show executive producer David Shore said of his decision to kill off Melendez: "I've always felt in running shows that it can't just be, 'Oh my God, is he going to die?! No, he's not.'

"I think in a medical show in particular, you have to set up situations where people might die regularly, guest cast and your regulars. Every now and again you have to be true to that, or else the stakes lose their stakes even in the other stories."

the good doctor season 3 finale
The ending of 'The Good Doctor' Season 3 saw Dr. Neil Melendez (left) die while Dr. Shaun Murphy (right) found love with Lea ABC

Gonzalez said of his character's exit to TVLine: "It was a creative decision [that] just kind of came at a good time, you know?... But there also comes a time when you feel it's time to move on, and I feel like I'm leaving Good Doctor at a really great place."

Melendez's exit leaves Claire having to deal with the second death of someone close to her this season after her mother passed away earlier in the run. However, Shore told EW that she should be able to deal with this second blow a little better than the first. He said: "We've thrown a lot of crap at that poor character...I think, ironically, to a great extent because of Melendez and because of his guidance—and we see this in part 2 a little bit — she's a bit of a different person now than she was when her mother died.

"The irony is that when her mother died, she lost a very unstable influence on her life. Now she's losing a very stable influence on her life, which is a higher cost to pay, but she's also been the beneficiary of that stable source."

On the happier side of the latest Good Doctor finale, Dr. Shaun Murphy (Freddie Highmore) ended a season of romantic problems with a kiss from Lea (Paige Spara). Though she had previously rejected him, hearing him save a woman's life on a walkie-talkie in Episode 20 made her realize her true feelings.

"We explored a bunch of different choices as things went along," Shore said. "I really liked his relationship with Carly, we all did. Jasika Nicole was so great. But Paige is so great and Lea's so great, and this felt right at the beginning and right at the end. It feels like this is where it should be, and we'll explore that relationship next year as well."

With Carly off the table as a romantic interest for Shaun, Nicole's time as a regular on the show is also coming to an end. Shore told TVLine: "I would love to have her back here and there, I love Jasika, and would love to see her on the show, but it will not be in the same capacity."

Elsewhere in The Good Doctor Season 3 finale, Dr. Alex Park (Will Yun Lee) was considering leaving the hospital to be closer to his kids. This came after a teenager he was trying to save at the brewery died. However, Shore reassured fans that the character is not going anywhere. He told TVLine: "We're not planning on losing him from the show, is the short answer."

The Good Doctor Season 3, Episode 20 is streaming on the ABC website and app now.