Bundesliga is a much better league for aging attackers and Bayern in particular have a great track record getting production out of age 30+ forwards, including Lewa, Muller, Robben, Ribery, Makaay, Toni, etc.
I think it’s just a good deal for all parties. Liverpool are smartly looking toward the future. Better to sell a player like Mane one year too early than resign him to a crippling contract. Bayern will get a top player who will do well in the Bundesliga. And Mane gets a new challenge and a lot of money.