The idea to kill off Thanos at the beginning of Endgame was a controversial decision, but it paid off in the end.