19th-century political economist Frederic Bastiat offered an answer to such a question in his 1850 essay "That Which Is Seen and That Which Is Unseen." (This was, of course, translated from the French "Ce qu'on voit et ce qu'on ne voit pas.") Bastiat's reasoning goes as follows:
Have you ever witnessed the anger of the good shopkeeper, James Goodfellow, when his careless son happened to break a pane of glass? If you have been present at such a scene, you will most assuredly bear witness to the fact that every one of the spectators, were there even thirty of them, by common consent apparently, offered the unfortunate owner this invariable consolation—"It is an ill wind that blows nobody good. Everybody must live, and what would become of the glaziers if panes of glass were never broken?"
Now, this form of condolence contains an entire theory, which it will be well to show up in this simple case, seeing that it is precisely the same as that which, unhappily, regulates the greater part of our economical institutions.
Suppose it cost six francs to repair the damage, and you say that the accident brings six francs to the glazier's trade—that it encourages that trade to the amount of six francs—I grant it; I have not a word to say against it; you reason justly. The glazier comes, performs his task, receives his six francs, rubs his hands, and, in his heart, blesses the careless child. All this is that which is seen.
But if, on the other hand, you come to the conclusion, as is too often the case, that it is a good thing to break windows, that it causes money to circulate, and that the encouragement of industry in general will be the result of it, you will oblige me to call out, "Stop there! Your theory is confined to that which is seen; it takes no account of that which is not seen."
It is not seen that as our shopkeeper has spent six francs upon one thing, he cannot spend them upon another. It is not seen that if he had not had a window to replace, he would, perhaps, have replaced his old shoes, or added another book to his library. In short, he would have employed his six francs in some way, which this accident has prevented.
In this parable, the thirty people telling the shopkeeper that the broken window is a good thing because it keeps the glazier employed are the equivalent of the journalists and politicians who say that natural disasters are actually an economic boon. Bastiat's point, on the other hand, is that the economic activity generated for the glazier is only half of the picture, and it's therefore a mistake to look at the benefit to the glazier in isolation. Instead, a proper analysis considers both the fact that the glazier's business is helped and the fact that the money used to pay the glazier is then not available for some other business activity, whether it be a purchase of a suit, some books, etc.
Bastiat's point, in a way, is about opportunity cost- unless resources are idle, they must be shifted away from one activity in order to be shifted toward another. One can even extend Bastiat's logic to question how much of a net benefit the glazier receives in this scenario. If the glazier's time and energy is finite, then he is likely shifting his resources away from other jobs or pleasurable activities in order to repair the shopkeeper's window. The glazier's net benefit is presumably still positive, since he chose to fix the window rather than carry on with his other activities, but his well-being is not likely to increase by the full amount that he is paid by the shopkeeper. (Similarly, the suit maker and book seller's resources won't necessarily sit idle, but they will still suffer a loss.)
It is quite possible, then, that the economic activity following from the broken window merely represents a somewhat artificial shift from one industry to another rather than an overall increase. Add into that calculation the fact that a perfectly good window got broken, and it becomes clear that it's only under very specific circumstances that the broken window could be good for the economy as a whole.
So why do people insist on trying to make such a seemingly misguided argument regarding destruction and production? One potential explanation is that they believe that there are resources that are idle in the economy- i.e. that the shopkeeper was hoarding cash under his mattress before the window was broken rather than buying the suit or the books or whatever. While it is true, under these circumstances, that breaking the window would increase production in the short term, it is a mistake to assume without sufficient evidence that these conditions hold. Furthermore, it would always be still better to convince the shopkeeper to spend his money on something of value without resorting to destroying his property.
Interestingly enough, the possibility that a broken window could increase short-run production highlights a secondary point that Bastiat was trying to make with his parable, namely that there is an important distinction between production and wealth. To illustrate this contrast, imagine a world where everything that people want to consume is already in abundant supply- new production would be zero, but it's doubtful that anyone would be complaining. On the other hand, a society with no existing capital would likely be working feverishly to make stuff but wouldn't be very happy about it. (Perhaps Bastiat should have written another parable about a guy who says "The bad news is that my house got destroyed. The good news is that I now have a job making houses.")
In summary, even if breaking the window were to increase production in the short run, the act cannot maximize true economic well-being in the long run simply because it will always be better to not break the window and spend resources making valuable new stuff than it is to break the window and spend those same resources replacing something that already existed.