Oil, oil and oil. And the corporate deals linked to oil. There was a LGW to Hassi Messaoud too for a couple of seasons.
RAK is sustainable as there is a big inbound tourism flow year round. Great jumping off point for many other parts of Morocco too.
CMN has multiple AT flights daily from London as well as connections via MAD: I think IB also serve AGA though the charms of Agadir itself are pretty dubious.