I can't speak for Iraq but we try to avoid civilian casualties in Afghanistan. Sometimes you don't see a civilian though. The bad guys like to use houses/ citadels as firing points. We've used a GBU-31 on a single sniper before.
You try to avoid them but they still happen.