Demon Slayer Mugen Train arc is airing now, and while fans who have watched the movie know what's coming, it doesn't make the aftermath of the fight against Enmu and subsequently Akaza less important.
Disclaimer: Major spoilers for the Demon Slayer anime and manga included in this article.
While fans mourned the loss of this lovable character deeply, they also agreed that Rengoku's demise was inevitable.
Why was Rengoku's death necessary in Demon Slayer?
In season 1 of Demon Slayer, it was revealed that there is one Hashira for each specific Breathing Style. When a Hashira either dies or retires, another may take their place either by virtue of their undeniable skills, or by being a "tsuguko."
That's one trained by a Hashira to take over for them in the future, such as Tomioka Giyu did after Urokodaki's retirement, and in the way Tsuyuri Kanao is trained by the Insect Hashira Kocho Shinobu.
Not every Hashira has a successor, such as Shinobu's deceased older sister Kocho Kanao, who was a Flower Hashira. Flame and Water Hashiras have existed in every era without fail, however.
While Tanjiro does start off with Water Breathing as his Breathing Style, once he discovers Sun Breathing, it comes abundantly clear that at some point he will become the next Flame Hashira.
At the beginning of Demon Slayer Mugen Train, there was a possibility of Rengoku training Tanjiro as his tsuguko, but since Rengoku knows nothing about the Sun breathing, his instruction would probably fall short of what Tanjiro needs to unlock his real potential.
Moreover, Tanjiro's character arc is one where he figures things out himself in a moment of frenzied inspiration, like he did with Hinokami Kagura. Tanjiro usually requires a trigger: be it the massacre of his family, protecting Nezuko, or watching Rengoku die in front of his eyes.
From a technical point of view, Rengoku's death does more than act as a trigger for Tanjiro realizing his potential. The Flame Hashira's demise sets a balance of power in Demon Slayer, establishing the demons as having the upper hand and being formidable opponents, even for the Hashira.
At the same time, it shows off the true strenght of the demon slayers and the staggering significance of defeating one of them.
Killing off a beloved mentor figure for the protagonist's character growth is a popular trope in shonen anime, albeit one that is often criticized. However, it's also a plot that is compelling and effective.
Besides, it's always the protagonist's personality that determines how this kind of thing will register. In the Demon Slayer manga, Rengoku's influence acts as a ray of hope, even during one of Tanjiro's darkest moments.