It's an over the top reaction, but if someone isn't pulling their weight and is damaging the group then they deserve to be called out. Cancelo was a bad egg in the camp so Pep got rid. It's more cut throat to do that than to call them out and give them a chance to change their attitude.
The issue at Burnley, whether Kompany's fault or the board's, was that they put too much faith in talented youngsters and didn't have enough nous to stay in the division. They played some lovely football but orchestrated their own downfall fairly regularly. I'd imagine they come straight back up and will be in a better position to stay up next time.
I'm interested to see how Kompany gets on at Bayern. I want them to fail because I fucking hate them, but I want him to do well - so it's a tough one. He has to win the league, play good football and challenge in the CL to get the fans on board realistically. But I think he's unlikely to need to throw his toys out very often with elite players - they are likely to want to play for him and perform to his standards and he's got an approach they should buy into.