That is an interesting question.
I think wanting to know the "why" of things could be a matter of humans being curious in nature. Why that is the case, could be because of evolutionary benefits to the survival of the species.
I think wanting to know the "why" is related to wanting to understand how thinks work - because if we understand how things work, we understand the cause and effect relations in a situation, and with that we can try to control things.
If I can understand why something is the way that it is, that makes it predictable in the future. And if I can predict how things will behave in the future, I can try to control them or use them to my advantage. This goes for small things, like food staying good for longer in the fridge, but also for large things, like the social and cultural systems at work in society.