That is pure mathematics, isn't it?
If your laptimes aren't slower by more than the time it takes to have an extra stop, divided by the number of laps until you reach the pit window, you don't pit the car.
The marshalls decided it was unsafe. Williams and Pastor apparently never did. So maybe what was "the teams fault", was really the best strategy, that got screwed by the marshalls?
No, that's the mistake Ferrari made earlier on in the season, when Alonso failed to pit and the wing failed.
It only makes sense to do the sums to work out if it's better to pit immediately or continue to the first scheduled stop if you are sure you can make it to your first scheduled stop without the wing failing. In this case one of the pillars that attaches the wing to the nose was broken and I, personally, was expecting the team to respond to that by bringing him in on the basis that it's not in their interests for the wing to go under the car and lift the front wheels off the ground.
As it is, race control made the decision for them, that's their job. Maybe the wing would have held until his scheduled stop and maybe that would have been the quicker option, but it's not a permitted strategy. You're not allowed to drive around with damage for lap after lap if the damage presents a hazard to other people on the track. As soon as the parts of the wing that hold it onto the car have failed (as distinct from simple damage to the endplates or wing elements or barge boards e.g. like Button) race control should be insisting that the car comes in to have the damage repaired. As far as I can see they did their job.