I know from FlightRadar threads there are a couple of ex ATCs and pilots around on MN so I'm hoping one of you sees this!
When a country is considered at high risk of attacks (terrorism, instability, etc) a lot of people won't visit, pretty reasonable. Yet ordinary people do fly to these places for work or because they have family or because they are returning home after a trip. And someone has to fly the planes and crew them.
So do the airline crew have specialist insurance, arrive, not leave the airport and depart in a day or two? Or even do they get straight back on a plane in a non-work capacity and just sleep as they fly out (seems inefficient in terms of rest and cost though) or do they do their regular in-country process but with a bit more wariness? Of course, making up a crew from local people might reduce the risk somewhat if spending a day in the country (familiarisation with the country, don't stand out as much) but they aren't immune from risk by any means and if you had to crew every flight like that there'd not be many flights at all.
As an example, there was a commercial passenger flight from Copenhagen to an Iraqi city this weekend but the UK FCO have Iraq as a red country iirc and I imagine Denmark probably considers it unsafe too.