AC and LH codeshare on their transatlantic flights. The AC FRA flight is oversold almost everyday. Obviously there was some growth potential for this route. Because AC and LH already code share on the route, it could have gone either AC adding a second flight, or LH operating one flight and AC operating the other. An agreement was made that LH will operate the A330 flight and the AC flight will go 767. Both airlines sell tickets on both flights and share revenue. This is the beauty of the STAR alliance.
So, to sum it up: AC and LH wanted YYC-FRA to grow. AC doesn't have the metal right now. LH agrees to operate one flight and AC switches its flight to a 767. Freeing up an A330 for AC. Who knows YEG, that 330 might be for you
When it comes to codeshare flights with airlines that are in bed with each other as much as AC and LH you almost have to think of it as a single airline. You can book the LH flight through Air Canada and it'll even show an AC flight number, there'll just be an asterisk with *operated by Lufthansa. You'll still get your Aeroplan points and everything.
Kris