Essaouira is quieter then Marrakech, and it is a lot calmer. There are fewer people here and the merchants are nicer, funnier and less pushy then in Marrakech. Wouldn't you like a quieter place?
I feel safer in Essaouira because inside the walls there are very few cars and scooters. However, in Marrakech there were scooters and taxis zipping past you because there are very few sidewalks in the old city. In Marrakech it's also dangerous to cross the street because there are crosswalks but very few drivers stop at them, so you have to walk through the traffic. It was scary and not very fun
Lastly, in Marrakech the ferrel cats look hungry and sick, but in Essaouira the cats look cleaner and it looks like people have been feeding them. I care that the cats look healthy because it feels like a safer environment for everyone.
These are my three reasons why I prefer Essaouira over Marrakech.