Seven days forces a choice between the imperial cities and the desert. Ten days removes it. That is why 10 days in Morocco is the length we recommend most often for a first visit: Fes done properly, the Sahara done properly, and three unhurried nights in Marrakech at the end.
The catch is geography. Fes is in the north, the dunes are in the south-east, Marrakech is in the south-west, so the route has to move in one line. From Casablanca we go north-east to Rabat and Fes, south over the Middle Atlas to the Sahara, west through the gorges, and over the High Atlas to Marrakech, never on the same road twice.
Two rules shape every 10-day Morocco itinerary we build. Rabat is the first stop after Casablanca, not a detour at the end. And there is no shortcut from Fes to Ouarzazate: the desert is reached through Ifrane, Midelt and the Ziz valley, and Ouarzazate comes after it. Ignore this and you get nine-hour days.