Well sometimes...
There are however times when there is no purpose in asking why as there is no reason or answer to the why question. For example why did it rain or why did the earthquake strike? One can speculate or propose some fantasy type explaination but not produce facts or anything of substance. Words such as luck, chance and oportunity come to mind in this situation and perhaps would be useful in trying to reason why.
When it comes to man made products events or services then it is a different "ball game" you should and must ask why. Much of the progress we have made in history has come about by asking why and intensively searching for facts and explainations.

Our health safety systems do this and much valuable knowledge and expertise has been gained in these fields. The black box on an aeroplane helps investigators answer the why question and consequently many safety features and improvements have been developed. Governments use commisions of inquiry and again the purpose is to further the greater good.
Well ask why when it serves some purpose. But do not ask why when there is no answer to be found. Perhaps the best we can do is
be wise in hindsight.