Warning! SPOILERS for Grey’s Anatomy season 18 ahead.

Miranda Bailey worked hard to save Grey Sloan Memorial’s residency program in Grey’s Anatomy season 18, and yet it was shut down - but the medical drama’s season 18 finale finally delivered justice for her. Bailey (Chandra Wilson) has been a staple for Grey’s Anatomy since season 1, and when she finally became Grey Sloan’s chief of surgery, it was well-deserved as few worked as hard and cared as much as she did for Grey Sloan Memorial. While immensely rewarding, the job came with heightened stress for Bailey, and the stress only became worse with Grey’s Anatomy season 18.

After Grey’s Anatomy season 17 focused on the pandemic and the strain that it put on Grey Sloan and generally the world in the show, season 18 couldn’t forget the consequences it left, even if it was set in a fictional post-pandemic world. The first half of Grey’s Anatomy season 18 saw Bailey trying to secure enough attendings in order to make Grey Sloan Memorial’s residency program palatable, especially as they were decimated because of the pandemic. Many died, some retired, and others changed professions, and Grey’s Anatomy offered an example of that in Jo Wilson, who switched to obstetrics and gynecology as being a general surgeon didn’t give her joy anymore. Bailey had to deal with all of that, but as the Webber teaching method failed and caused one resident to drop out, things got even worse, with the Medical Accreditation Council getting involved and starting to investigate Grey Sloan Memorial Hospital’s residency program.

Related: Grey's Anatomy S18 Remembered The Show's Most Underrated Relationship

These issues brought Bailey under an enormous amount of stress, which only increased when she understood Meredith (Ellen Pompeo) intended to accept Hamilton’s offer to work in Minnesota and leave Grey Sloan. Grey’s Anatomy season 18 finale having Bailey handing the keys to her office to Meredith was as powerful a scene as fitting for Miranda, as she really gave her all to try and save the hospital’s residency program but failed nonetheless - as the issues weren’t fixable in the short amount of time she had to turn them around, and she also wasn’t as supported as she was supposed to. Indeed, Richard’s Grey’s Anatomy season 18 big storyline involved him getting tested to see if he was still fit to operate. Her quitting as chief of surgery, despite loving the job very much, showed that the Grey’s Anatomy season 18 finale delivered justice for Bailey, as she finally did what she needed to preserve her physical and mental health.

Bailey Miranda Justice Greys Anatomy season 18

While Bailey’s health was the focus of a couple of episodes of the show, none were as impactful as Grey’s Anatomy season 14 episode 11. While the episode’s main focus was Bailey’s heart attack and the medical staff at Seattle Presbyterian not believing her, it also established her heart problems and how she neglected her stress levels, realizing she needed to learn to control them. Despite knowing that, Grey’s Anatomy season 18 had Bailey revert to a state where she did whatever she could for Grey Sloan, even at the expense of her health. Grey’s Anatomy season 18 finale’s ending not only let Bailey take back the reins of her life and put her health first, but also saw her establish her priorities, such as spending time with her adopted daughter Pru.

Bailey will undoubtedly be central to saving Grey Sloan’s reputation as a leading hospital in Grey’s Anatomy season 19. Whether she’ll ever go back to being chief of surgery or it’ll happen in another capacity, though, it’s clear Bailey would never abandon Grey Sloan Memorial Hospital. However, the Grey’s Anatomy season 18 finale rightfully made a point of having Bailey stop sacrificing her well-being for the hospital, letting her take care of herself and let the job come second, and finally giving her character justice.

Next: Grey's Anatomy Just Heavily Teased Season 19 Will Be The End