In Avengers: Infinity War, Thanos came into conflict with The Avengers as they attempted to stop him from obtaining the Infinity Stones.
According to comicbook.com, Marvel Studios' Head of Visual Development Ryan Meinerding revealed why he kept them alive.
"The plan of getting all the Infinity Stones is putting [Thanos] in the 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.