those are more like characters who eventually became supporting characters.
Yeah, but that's the point. When you take the time to empathize with a character, then part of their story arc might involve a change of heart. They started out as very clear antagonists to the main character, and depending on who you ask, both characters became a lot more interesting than the designated hero. That kind of change in a villain can often be the defining moment for both the hero and the antagonist alike. Plenty of good drama to be explored in that kind of situation, but again, it's not necessary in every story.
(Loki is only interesting in the films)
Throughout several incarnations, the figure of Loki as a myth and as a character, is one of the most interesting characters to explore. In the old Norse myths, he was usually the Creation myth and was associated with giving humans speech and thought. He was portrayed as the chaotic trickster archetype who shifted allegiance, shape, and even gender all for the sake of what might be humorous. Seeing how he reacts to different situations, as well as the ways that the Gods reacted to him was what made Loki stand out. He was alienated for always causing mischief, but just as often, he was celebrated for being a source of entertainment. What made him so memorable was that for all of the stories where Loki played the hero or the sidekick, he ultimately went too far. The growing gap between Loki and the rest of the Norse pantheon made his pranks get gradually darker and more violent. The rift eventually came to a head when Loki indirectly caused the death of Balder and kick-started Ragnarok. When the Gods retaliated with anger and punishment, Loki responded with violence, and would later go on to lead the nasty forces in the Big Brawl at the End of it All.
As for the Marvel Comic iteration of Loki, he was still an incredibly deep and interesting character. Jack Kirby introduced Loki and Thor as a kind of role-reversed version of Moses and the Pharaoh Ramses. While Moses had been adopted by Egyptian royalty, he later learned of his origin as a Jew, and sought to lead his people away from the reign of his adopted brother Ramses. Loki and Thor went through a similar origin story,but cast the first-born son Thor as the hero while the adopted outsider Loki struggled with both his identity and allegiance. Western writers have taken that dynamic in SEVERAL interesting directions over the years, and each one brings something new to the table. The conflicted Loki we're seeing in the films now is just a taste-test of what's been going on for years in the comics.
On an unrelated note, here's a fun writing exercise: take a familiar story and reverse the "good-guy/bad guy" dynamic. Try to imagine those roles reversed and how that changes the motivations of everyone involved. For a great example, try Neil Gaiman's short story "Snow, Glass, Apples."