Ignore what Marvel tells you. Loki is not Odin's adopted son. Loki is his blood brother. In the original Eddas, it has been highlighted that Loki and Odin "mixed-blood" or as they put it made a blood oath with one another solidifying their brotherhood. Loki has reminded Odin that neither one should feast with the gods without the other as it was part of their blood oath. Here is the excerpt from the Lokasenna:
9. Loki spoke:
"Remember, Othin, | in olden days
That we both our blood have mixed;
Then didst thou promise | no ale to pour,
Unless it were brought for us both."
10. Othin replied:
"Stand forth then, Vithar, | and let the wolf's father
Find a seat at our feast"
For those of you who don't know. When Odin spoke to his son Vidar referring to Loki as the wolf's father, the wolf is Fenrir, Loki's son with Angrboda, and he is destined to kill Odin at Ragnarok and then slain by Vidar. It is rather interesting that Fenrir is mentioned at the dinner table between the most important key figures at Ragnarok. I think that this is an element of foreshadowing of what is to come at Ragnarok. Anyway back to the topic at hand.
We all know from the myths that Loki is the Trickster. The trickster as an archetype has been present in all world's mythology and literature. Sun WuKong in Journey to The West. Puck in Shakespeare's a Midsummer Night's dream. Hermes the messenger god from Greek mythology. Anansi the Spider in African folklore, Mark Twain's titular character Tom Sawyer, and The most popular supervillain in Comicbook history: The Joker. Almost every single time the trickster would like to cause trouble both for humans and celestial deities alike. No one is spared from their mischief and cunning nature. Sometimes it's just harmless pranks for all good and fun, other times they take it to far and irreparably fuck up their relationships with their kin and inevitably make fools of themselves. And also sometimes their trickery can be justified to tone-down the arrogance and fool-hardiness of both men and gods, and to teach them a valuable lesson. It's kind of funny how these things go.
Now in the myths, Loki has pulled a couple of pranks on his Asgardian families and often gets punished by Odin. It is only until that Loki did something far unforgivable by tricking Hodr the blind god into throwing a mistletoe spear at Baldr, killing him. This was the final straw and Odin sent the gods to hunt him down to face judgment. Loki was a notorious shapeshifter so he was able to escape the gods by taking disguises into various animals. one of them was a salmon swimming with a school of other salmon and tries to move up the stream. But Not even Loki could escape Odin's all-seeing eye, and once Loki was captured. he was bound in chains, made from the entrails of his son Narfi far beneath the Earth and was forced to have snake venom dropped in his eyes to blind him. Then Sigyn, Loki's wife came and brought a bowl to fill the venom so it doesn't drop in his eyes. But each time the bowl gets full. Sigyn will have to empty it and the venom drops back on Loki where he writhes in pain causing earthquakes beneath the earth. This torment would continue until Ragnarok, where Loki will be free to lead the Jotnar to fight the gods in their final battle and Fenrir, will be free from his bonds ready to devour Odin.
However, there were instances of when Loki aided the gods. In one of the stories, back in the early days of Asgard, the gods wanted to secure their borders from the jotun, and one of the conclusions the came up with was building a wall around Asgard. They hired a mason that can be able to build the wall within three seasons, but on the condition that they give the sun, the moon and the goddess Freyja for her hand in marriage to the builder. Now Freyja was not having that. And neither did the gods. When they noticed that the builder was actually getting the work done almost on schedule, they pretty much insisted for Loki to make sure did not get the wall done in time. Loki noticed that most of the work was being done by a horse. So what Loki did, and this is the part of the myth where it's really fucked up, he disguised as a mare and told the horse, Svaldilfari, that he is a slave and has no freedom unable to chase its desire because it is subservient to the builder. of course, Loki tricked the horse, but let's just say the horse wanted a little reward for his "freedom". (whatever gets the job done right?) Point is the wager was won in the gods favor, and they were able to keep the sun, moon and Freyja did not have to get married. Although Weird enough, Loki got pregnant and he gave birth to the 8 legged horse, Sleipnir, Odin's trusty steed. I did say the myth was fucked up.
Now for the meat and bones of the analysis
Now as the archetype of the trickster he is the mirror reflection of the Magician archetype from the Jungian school of thought. This is another explanation for the blood relation between Odin and Loki. One seeks to obtain knowledge and wisdom without rest. Sometimes on his own merit and other times by deceit and trickery as well. Odin's strategy is using brain and brawn. This can also be highlighted with the Greek Odysseus in Homer's Illiad and the Oddysey. Odin did use underhanded methods himself to obtain his goals in order to delay Ragnarok. With Loki, it's always with deception. In a way, they are two sides of the same coin which could be what the myths are referring to. Odin as a god is not only a god of scholars, mages, kings, and nobility, as well as warriors, he is also a god for rogues, bandits, thieves, heinous criminals and con-artists. Odin as a character is not above using any and all means to get the job done since he was totally okay with getting the horse unable to finish the wall in time thanks to Loki. He would even stir strife and have humans go to war with one another to claim the fallen souls into Valhalla so that he can get an army for their final battle at Ragnarok even though he himself is fated to die. I would like to write an article that goes more in-depth with Odin, but this is an ARN article discussing Loki at the moment.
Loki has always been compared to the Devil in Christianity. probably because the ones who translated the poems and wrote them down were Christian monks. It's much more complicated than that. Loki is a being of chaos. As I mentioned before he is a trickster. Not necessarily evil because let's be honest all the gods in mythology have good and evil aspects within them. They have all done morally questionable shit. They are heavily flawed characters, which is the point of storytelling. Loki is also Thor's travel buddy when they needed to retrieve Mjolnir.
Ironically enough, If Loki did not instigate the events that led to Ragnarok, there wouldn't be a new cycle or the beginning of a new era. He is the chaotic force that starts the change for an order to come out of it if you look at it from a more meta perspective. Like when an order starts to degrade and corrupt itself, chaos is often necessary to bring the needed change to start anew. Like the changing of the seasons, or a volcano erupting to bring fertility back to the soil, or the extinction of the dinosaurs that started the epoch for humanity. Once you have taken the rule of change into consideration. I would compare Loki's archetype to our current President Donald J Trump. He ran a chaotic campaign, pretty much-stirred chaos into the elections leading to his presidency. Every time he does something on the news due to his celebrity status, chaos ensues. And that chaos is his brand. He is the perfect candidate for the modern day trickster. As my good friend, meta use to say "It is the Fool who is the true King, and the Fool who knows all. The Fool lies in the Eye of the Hurricane and Can see Everything." No one expects a jester to get the job done. There are more articles that go more in depth in the subject, and I'll leave the sources down below. Feel free to leave your comments and thoughts and feel free to add and weigh in more on this discussion regarding the role of the trickster.