It's a matter of balancing the cost of repair against the aircraft market value after repair. An A340-500/600 still commands a healthy price, right?
...and methinks Airbus Industrie has a nearly new, only slightly used A340 aft end on hand for a quick job...