Why did the directors kill off QuickSilver in Avengers: Age of Ultron?
Pointless to have a "main" character killed off after one movie.
This is what Marvel producer Kevin Feige said about the death here:
"It adds stakes to the ending of the film," he said, adding that it also serves as a way "to show repercussions to Ultron's actions, and also in a way to solidify Scarlet Witch's character, and Wanda's arc in the movie and where we'll see her in the next films."
So official answer is that Marvel could only use the two characters, Scarlet Witch and Quick Silver, for one movie, and had to give ONE of them back to Fox. Since they decided that Scarlet Witch fit into the MCU storyline, so they killed off Quicksilver and gave him a way into the MCU.