The universe of Marvel is surrounded by different theories trying to explain an infinite situation. Much has been speculated by fans of Marvel about bad behavior by Loki, brother to Thor. And it seems that now it's bigger theory it has been confirmed.
The followers to Marvel they had one theory to explain why Loki did what he did and this was that his mind was controlled by Thanos. Over time, this theory It loses strength and was no longer seen as probable, however Marvel He surprised everyone with a revelation.
In the biography of Loki published by Marvel, it is explained that he survived his death in the first movie of Thor and he met the other, Chitauri and Thanos. Then it was given to Loki a scepter that he could control the mind of others, but what he did not know was that his mind would also be controlled.
That is why Thanos He gave the thought to Loki and could make him envy and hate Thor. But in case there are still doubts, this will probably be explained better Avengers: Endgame.