And then the Western world thinks it is their duty to remove these people, the countries becomes completely disorganized and everything goes to shit. Then they hold elections, and a Muslim Brotherhood like party wins making matters far worse. Now if you have a dictator who is at least mildly secular and open to reason when it is presented with the promise of financial gain, this is infinitely better for both the Middle East and the Western world.
Back in the day, Gadaffi had a deal with Silvio Berlusconi of Italy. Gadaffi stopped the refugees from getting on the boats, Berlusconi made it worth his while. Had Gadaffi remained in place, I am willing to bet there would not have been a refugee crisis. But we (America, France, UK) think "democracy" is the be all, end all. It isn't. These are countries where tribal loyalties are everything, and the need for strong leadership is practically ingrained in these people's DNA. The sheikh or village elder who would settle disputes is what works for them.
They crave strong leadership. The ones who demonstrate are either religious fanatics or university students who want freedom of speech. The silent majority is fine with the status quo, even if the status quo means being ruled by crooks, provided the crooks are somewhat capable of doing their jobs. The current crisis is a crisis of Europe's own making.
We have to get rid of the idea that the same systems that work for America and Europe, will work everywhere else in the world regardless of culture or religion. They don't.