Loki was just a poor boy who got treated less then any other person in Asgard. He never wanted to be treated like this, but do to him being a frost giant at heart they treated him differently. This is why he did what he did, not because he hated Thor or his home. But, because he was abandoned by the people who he thought cared about him. This is why Loki went at of his way and decided to take over the Earth and Asgard.