The decision of the EU is based on epidemiology and reciprocity.

Morocco Makes EU’s Finalized ‘Safe Countries’ List for Schengen Travel
Moroccan passport