In this movie, we do see Michael firing Tom as the consigliere. What happens at the end of The Godfather makes sense when Michael is targeted for an assassination attempt in his own home in The Godfather Part 2.
Firstly we need to keep in mind the meaning of the word "Consigliere".
consigliere (kɒnsɪˈljɛːreɪ/)
noun noun: consigliere; plural noun: consiglieri
a member of a Mafia family who serves as an adviser to the leader and resolves disputes within the family.
Source: Merriam Webster
After the attack on Vito Corleone, when Michael takes charge of the Corleone family, as he has learnt from his own father, he knew the first thing to do is to make his own family secure. We do see, even between the five families, there was never much faith or loyalty which becomes prominent after the demise of Sonny. Sonny's death at the hands of Barzini family shook the Corleone family to the very root. So, here Michael wanted a person to fall back to in times of distress. He wanted a person who would not be directly linked to the direct actions taken by Michael, but someone on whom he could count for his own family's safety. That was none other than Tom Hagen.
Secondly, it wasn't only Michael's decision:
Michael: When we make our
move there you're going to be my right hand man. Tom Hagen is no
longer Consigliari. He's going to be our lawyer in Vegas. That's no
reflection on Tom it's just the way I want it. Besides, if I ever help
who's a better Consigliari than my father. That's it. [Everyone except
Hagen leaves]
Tom Hagen: Mike, why am I out?
Michael: You're not a
wartime Consigliari, Tom. Things could get rough with the move we're
making.
Don Corleone: Tom, I advised Michael. I never thought you were
a bad Consigliari. I thought Santino was a bad Don, rest in peace.
Michael has all my confidence as do you. But there are reasons why you
must have nothing to do with what's going to happen.
Tom Hagen: Maybe
I could help.
Michael: You're out, Tom.
Here, Don gives us a small hint of the fact that there are bigger designs in the making, and for the family's safety, Tom Hagen should have no part in it.
In Godfather Part 2 we find:
Michael telling Tom, just after the assassination attempt, that he is the only one he can trust with his family.
Michael: There's a lot I can't tell you. Tom. And I know that's upset you in the past.You felt it was because of some lack of trust or confidence.But it's because I admire you and love you that I kept things secret from you.That's why at this moment you are the only one I can completely trust.
We see, he could not trust even his own brother Fredo. Here Michael asks Tom to "take over" as Don.
To answer your first question: He wouldn't have been able to do this if Tom Hagen had continued being directly involved in the actions and steps taken by Michael.His interactions with the outside world, or with other families would have kept Michael from having full faith in him. That's what exactly happened with Fredo.
For your second question: We have seen Michael becoming very sensitive, hostile and protective when it comes to his family. As Michael had already started thinking of Tom as his own brother, more than Fredo at times, he was hurt to find that Tom has kept things from him.

Michael eventually grew to embody the worst of everything his family
represented. Yet, he loved his family dearly. Family was the most
important thing in the world to him. However, he was so vengeful, he
would kill his own brother, Fredo. He was sane and mad, kind and
cruel, powerful and weak. He was a masterful, strategic thinker
blinded by vengeance. He would publicly renounce Satan and all of his
works at the baptism of his godson and promise that he would protect
that child from the wickedness of the world while outside his men
murdered all of his enemies.
Source : Character analysis