It’s a question with two answers, the actual answer and the profitable answer: why didn’t Thanos kill all the Avengers (and friends) in Infinity War? He only took out some — and half the universe — when he should full well know that if anyone can undo the ramifications of his snap, it’s Thor, Iron Man, etc. Well, the actual answer is: Marvel likes making money, and Avengers 4 is poised to make a lot of it, and it would be hard to do a sequel to Infinity War without the Avengers. But that’s not the (on-record) answer Marvel is going with.
In the new book Avengers: Infinity War – The Art of the Movie, Marvel Studios head of visual development Ryan Meinerding explains that Thanos didn’t wipe out everyone because… he didn’t want to. “The plan of getting all the Infinity Stones is putting him in a position of being so powerful that he is sort of calmer, more single-minded, and more reasonable. He is not necessarily worried about killing the heroes,” he said. “As long as he ends up with the stones, he can accomplish what he wants. That was sort of the place where we were starting. We were trying to find looks that were more casual, because he wouldn’t really need his armor after he had gathered more than one Infinity Stone.”
As far as super-villains go, Thanos is somewhat sympathetic (as far as evil space-monsters go). He doesn’t kill for the sake of killing; he kills because he thinks he’s doing something good for the entire galaxy. Still, his mercy may come back to bite him in the purple butt in Avengers 4, which opens on May 3, 2019.