Thor: Ragnarok - What The Ending Really Means
3. ...And He's Definitely Going To Betray Thor AGAIN
You know what you're going to get with Loki: he's the God Of Mischief, a trickster and someone you should never trust as far as you can throw him. Even if you're Thor and could throw him pretty far.
Ragnarok sees Loki defer to type and following his arc in The Dark World again. He aligns with Thor for the greater good (and to a certain extent for reasons of self-preservation) but then takes his opportunity to turn on his brother when he thinks a betrayal will be self-serving.
Sadly for him, Thor has finally grown wise to his brother's true nature and outsmarts him, but then seemingly aligns with him again for the final act despite that betrayal because he turns up to save the Asgardians (possibly only because of Korg and Miek leading him there).
What looks inevitable is that Loki will once more revert to being a bad guy, and the fact that he now has the power of the Tesseract behind him might well give him the opportunity.