One of Luffys biggest traits since day one, has been to be able to distinguish between good and bad people. If he's helping Loki, then he doesn't view him as a bad person.
Us, as the readers, knowing Luffy can tell the difference between good and bad people, can then deduce that Loki must not be that bad of a person.