Thor: Ragnarok film explained the reason why Odin took the powers from Thor in the first film. Let me recap a bit for you. In the first film, Odin stripes off the power of Thor. When he foolishly launch a strike against Laufey and the Frost Giants of Jotunheim. Thor impulsive action risked a war between Asgard and Jotunheim. A war that could have cost millions of lives.
So to make Thor realize his mistake Odin takes all the powers of Thor and declared him unworthy. Odin bound Thor’s power to Mjolnir, saying that he would be able to become Thor again only when he proves himself to be worthy of the powers.
But the new part of the film Thor: Ragnarok revealed the real reason behind it.
According to the film, Odin’s father Bor fought a battle against the Dark Elves and even won but the battle led them to almost extinct. After which he maintained in thousands of years of peace. So that nothing like this happens again. But as per Thor: Ragnarok this peace was actually ended by Odin himself. His daughter Hela was his Executioner, who was leading his forces to battle and slaughter all those who stood against Asgard.
Later, when Hela’s lust for blood and ambition to conquer everything outstripped Odin’s ambitions. He banished Hela and called himself the cause for peace to break. Later, Asgard became the defender of the Nine Realms.
In the first film, Odin sees himself in his son. A reckless man who can again bring the chaos into the Asgard and destroy the peace treaty with Nine Realms. So to stop his son from making the same mistake. He stripped off the powers of Thor.