I think Bayern's logic is that Kompany's ideas fit really well with a side that has one of the league's best squads, rather than a tram battling for survival, and he'll get that at Bayern.
Saying that though, his inability to adapt to the situation and make the best of what he had should count against him. Playing like you have a top side when you don't is the naive mindset that guaranteed Burnley's failure.