Reason for this last minute decision remains a secret only 3 weeks from the first flight.
Lufthansa started PTY yesterday. Copa (who EK was going to code share with) is in the Star Alliance with Lufthansa.
I would hazard a guess that the Germans gave Copa an ultimatum of working with them or working with Emirates instead and even leaving the Star Alliance if they chose the latter, given the less than cordial relations between Lufthansa and Emirates at present.