Safety precautions usually. These attacks leave some debris scattered which means a (slightly) increased risk for incoming aircraft when landing. As a precaution aircraft are typically diverted until the runways have been inspected and any debris found cleared. Part of the 'fixed in hours' I mentioned, but during those hours any incoming traffic is usually directed elsewhere (although in most cases they could in fact land safely, but authorities prefer to verify that first).
Another reason can be the timing of the attacks. Incoming civilian flights while the attack takes place may be diverted again as a precautionary measure. It's not clear in advance how long an attack will continue for (not all missiles may arrive at the same time or there could be more than one strike), if all missiles will be intercepted or not, and if not, what damage they will inflict. And it's probably not a smart move to fly an airliner into airspace where both air-to-ground and anti-aircraft missiles are flying about. So it's better to be safe than sorry and divert.
Since Israel on average launches a strike at Damascus about once a month or so where they hit the airport, do you think they are destroying it every month and Syria rebuilds it every month? Of course not. These are nuisance attacks, nothing more.