It's mostly because Shanks fulfilled his purpose in the story by lending the strawhat to Luffy. Now that Luffy has become a Great Pirate, he just need to reunite with Shanks again and that's that. Shanks getting killed by Teach who is Luffy's nemesis would fits the theme better imo. That way, Luffy will grow even stronger and have more build-up to defeat Teach.
For as lighthearted of a story as one piece is, I don't think there needs to be anymore hate and or build up for the battle with teach. We know teach kidnapped coby and probably has law now as well, plus he was the one who captured ace and is at least partially responsible for his death, not to mention the first meeting between luffy and blackbeard they were getting ready to fight over simple differences of opinion about pie and a drink.
As far as shanks goes I don't think he will die before seeing laughtale or how luffy changes the world. I think about when Shanks and Buggy stayed behind when Roger went to the final island and how Shanks told Roger that if they want to see it some day they will do so with their own ships and crew some day. Also when Shanks told Ben that it was about time to join the race for the one piece I found it interesting that he chose to use the term race rather than fight or something else. I've had a theory for a long time that after blackbeard, the search for the one piece will end up as an actual race out on the open ocean similar to how the strawhats and kid pirates raced towards onigashima.
Plus with luffy and the crew sharing their prints of the rode poneglyphs with law and kids crews it seems like luffy wants more of a race against the ones he considers his friends rather than a fight. I think we'll see the rhp, cross guild, and possibly some other supernova all race towards laughtale after a final war with the wg, revos,etc.