The writers of Marvel's Avengers: Endgame have claimed that they could have easily made it so a "bloodbath" saw to the deaths of all of the original six Avengers if they wanted to but left some hope by keeping Hulk, Hawkeye, and Thor alive.
The team is short a few members after losing Iron Man and Black Widow, with Captain America probably way too old to even be useful in a fruit fight. It appears that Endgame was all about bringing an end to the founding members of the superhero faction, however, the crew opted to spare three of them and we can expect to see them back on screens in the future.
Writers Christopher Markus and Stephen McFeely recently discussed the franchise's storylines with Vanity Fair and would reveal why Thor, in particular, wasn't killed. Markus claimed that it had nothing to do with the possibility of future stories, simply that the Asgardian God had already sacrificed so much it would suck to still have him die (a fat God at that).
"It’s not necessarily that we knew they’d get more stories, it’s just that…Thor has sacrificed and sacrificed and lost and lost," he explained. "It’s not a good ending to kill him. To have him finally, reasonably content with himself - and with his current weight."
Initially, there were plans to have Thor go back to his original muscular self by the time Cap called for the Avengers to assemble but they decided to keep things more realistic in the end, leaving Chris Hemsworth's character depressed and out of shape.
"By the way… there were some people who were like, 'No, he has to magically lose weight'," Markus continued. "That was one of those sobering moments on set where some people were afraid. He’s going to put on the fat suit, and he comes out and basically looks like everybody on the crew. That’s not a fat suit! That’s a normal-person suit! But Thor was resolved. There’s a joy in letting him go off aimlessly into the ends of the universe."
Source: Vanity Fair