Coulson has been trying to step down since last season. If not longer. Last season he mentioned to Daisy that he wanted her as Director, and who better to be the new face of SHIELD than an Inhuman. Then we got Mace. With Mace gone, he's back to relying on Daisy as his successor.
Him dying will be full circle to a series end. It was likely the plan all along. With the series almost not getting renewed for this season, I'm sure they decided to really get that ball in motion when writing began for season 5. Believing season 5 would be it's last.
Kill off Phil. Daisy is tasked with SHIELD's leadership, but instead forms and leads the Secret Warriors. Mack and Yo Yo adopt a child. Mack retires to homemaker. Yo Yo goes with Daisy for her day job. Fitz-Simmons tie the knot and spawns one of Deke's parents. Close curtains.
Problem being is this season's ratings are giving likelihood that S6 very well could happen now. And what's the show without Coulson? It could potentially turn Phil's (final) death into a "jumping the shark" scenario if the show goes on without him, instead of that being the series conclusion.