If I can’t have you, I’ll beat/kill you so no one can have you. This is the insane rationale of men who beat or kill their ex-girlfriends (real or imagined). (If you are in a situation like this, please click here to get help.)
DAESH thrives on fear and chaos, believing their “order” would be preferred to the horrors of random violence.
Tunisia, and all normatively functioning countries, have an invested interest in creating a diverse market of products and services to generate foreign currency: tourism, agriculture, manufacturing. Even if the country is totalitarian, the need for money and trade is critical. The Filipino government depends on foreign remittances from their citizens serving in household and other endeavors in countries around the world. The Mexican economy depends in many parts of the country on those selfsame remittances from illegal immigrants to the United States, sending home money to support their families.
Broken and failed states are only interested in their self-preservation, inhabitants be damned. North Korea exports cohorts of slaves from its prisons (where “crimes” are frequently manufactured, and entire families are sentenced for the purported sins of a single family member) to work in Middle Eastern countries as construction workers. DAESH steals and loots from people that have run from their terror, extorts money for passage into, on, and out of its controlled territory and sells oil to the open market. There’s no real commerce, no industry: there’s only money into DAESH’s bloody pockets.
Depriving a country of legitimate revenue, like killings tourists, gives DAESH and other “angry boyfriend” terrorists a venue to increase their power. For where there is no economy, no markets, high unemployment, fear and anger, DAESH, like a lethal fungus, can take root.
Sunshine (transparency) and cleanliness (rule of law, fairness) are the cure for these situations. But it’s up to governments and rulers to invest in their people, in their businesses and industries, and schools to keep the population involved and interested in keeping the empty hatred of DAESH and its ilk at bay.