Why is my stomach upset?

The short answer

Change in diet, not food poisoning.

Moroccan cooking uses olive oil, argan oil, preserved lemons, and spice combinations your gut isn't accustomed to. The shift in fat type, fibre, and seasoning is enough to cause discomfort for the first two or three days. This isn't food poisoning — it's adaptation. Street food stalls with high turnover (the ones with queues of locals) are generally safe. The risk comes from food that's been sitting, not food that's been spiced.