As mentioned before, Kanan’s death was an inevitability. As Season 2 of Rebels built up to the grand finale, the show took on an eerie tone. It was clear that anything could happen to anyone on Malachor, and whatever occurred on the Sith world would leave all of the finale’s participants changed forever.
In an interview with Collider, actor Freddie Prinze Jr. revealed that he and Dave Filoni had discussions about Kanan being killed by Maul in “Twilight of the Apprentice
“Dave and I talked about me dying at Maul’s hand, at the end of Season 2, but then the same people who didn’t want me for the project suddenly said, “No, he can’t die. He has to be in every episode.””