Unlike movies, TV shows have the luxury of really dedicating time to exploring the nuances of characters, as they grow, learn and come to be transformed by the events of each season. They're not confined to a two-hour time frame, but can chronicle the development of these characters over years, imbuing them with a real history that makes their shifts in personalities make sense.
It's a freedom that's given us great arcs like Walter White's transformation from Mr Chips to Scarface, or Phillip's understanding of his own national identity on The Americans, but trying to keep a character arc consistent for years is difficult.
In fact, more often than not, character development devolves into little more than the writers completely changing their creation's personality on a whim, either because the original version simply wasn't working with stories or audiences, or because the writers lost sight of what defined them in the first place.
Consequently, you get beloved characters whose entire personalities shift for no real reason, and the writers just expect you to run with it and forget they were ever any different...