In Avengers: Infinity War, when Thanos
kills Loki and all the other Asgardians,
he then leaves
Thor injured, instead of killing him.
As mentioned in the comments, I believe Thanos didn't kill for the sake of killing - he had a purpose.
With that in mind, he only killed
professed their "undying loyalty"
immediately attempted to kill Thanos.
Which he would have seen to be a lack of loyalty, hence he killed him - not because they were a threat, but because they lied.
never did such a thing, hence he wasn't killed, despite being a potential threat.
never did what was mentioned above, they most likely would still be alive.
Expanding on what Edlotihad said, Thanos would have thought that
Thor would die in the explosion of the ship and also as Thor was beaten up Thanos would have thought that Thor wouldn’t be a threat to him because he does not posses any weapon and as thanos attacked nidavellir and killed almost all the dwarfs and stoped the forging process Thanos would also have thought that Thor wouldn’t be able to forge a new weapon as well.