It's part of the evolution of the languages of two nations isolated by different political systems. From the latin, the -ebam ending was changed to -éam in French. This in tern mutated into -ei, then -ai.
Voltaire, (the one whose statue may be seen at the Metropolitan Museum of Art and also at the Louvre) was the first important writer to use the -ais spelling for the imperfect, as recognized by the Académie Française in 1835.
Meanwhile, it would seem the Spanish didn't change their imperfect from the latin original in the same way as the French.
Hasta luego! : )
Source: Concise History of the French Language by John Fox and Robin Wood, in print version at Columbia University Library.