It's the path towards the ending that makes the game linear. No matter your choices, you always gain allies and always have to kill the Archdemon. What comes after is fluff.
Compare with Planescape: Torment, where different stats lead to an entirely different playthrough. Not to mention the game does not necessarily end with the mandatory killing of a boss.