Well, they lose two years of Johnny but get a cheaper cap hit for 6.
Makes sense for the Flames, and for Johnny as he can cash in @ 29 for what will eventually be a ridiculous paycheque.
They get him for basically the entirety of his prime. Yeah it would be nice if it was 7 or 8, but the price is at a great number.