Madua appears in biblical Hebrew (but is not found in rabbinic Hebrew). Klein provides the following etymology:
Contraction of מה ידוע ma yadua (=what is known? i.e. 'for what reason').
And reflecting that etymology, it refers specifically to the cause (in the past) of a thing, event, etc.
Lama has a wider background and usage than madua, and is used more frequently today (madua is considered much more formal). Lama is also found in biblical Hebrew but appears in rabbinic Hebrew as well. It also can refer to the cause of a thing, but can also ask "what is the purpose, aim". Its etymology shows that flexibility, for it is a contraction of ל-מה "for what". Lama asks about cause in Bereshit 4:7, 12:18 and about purpose in Shemot 5:22 and Iyov 30:2.
In this way, lama is indeed similar to the English "why", which contains both aspects - past and future. In other languages, there are different words for each meaning. For example, German has warum for "cause" and wozu for "purpose", and the same phenomenon can be found in other European languages.
Creating a dichotomy between lama and madua (even if it's not always faithful to the biblical lama, as we have seen), allows for some powerful interpretations about how we understand the world.
For example, in this fascinating video, Rabbi David Fohrman confronts the question that Moshe asks God after the sin of the golden calf (Shemot 32:11) לָמָה ה' יֶחֱרֶה אַפְּךָ בְּעַמֶּךָ - "Why (lama), God, should you be angry at your people?" Rabbi Fohrman asks:
What is he talking about? Why should you be angry at your people? They are supposed to be accepting the Torah, and they are dancing around a golden calf, an idol that they have made with their very own hands, and you have the chutzpah to ask God, ‘Why should you be angry with your people?’ What is he talking about?
But then later he answers:
In that case, by using the word lama, Moshe was challenging God - and in the end was successful. A different case, where we need to make sure we ourselves are asking lama and not madua is found in this powerful story:
So here you have to understand the crucial distinction between the two Hebrew words for ‘why’, lamah and madua. Why would one language have two words for ‘why’ unless they didn’t mean the same thing? Madua, from the word mada, is the scientific ‘why’. It means what happened in the past to cause the present state of affairs? When Moses looked at the burning bush, madua lo-yivar hasneh, what is it about this bush that causes it not to burn? It is a question about the past that would explain the present. But that is not the only kind of ‘why’ that you can ask. You can ask a different kind of ‘why’. A lamah kind of ‘why’. Lamah is a contraction of ‘le mah’, to what, for what, for what purpose. It is a question about the future.
Yes, I understand what happened to make you angry, God. That’s not my question, we all get that. The question is, where will this anger take you? Let’s read the rest of the words. Lamah yechereh apcha be’amecha. Moshe says, ‘why should you be angry with your people?’ Don’t say it is my people, it is your people. You are attached to them whether you like it or not.
On the morning of September 11, 2001, I found myself on the uptown campus of Yeshiva University. As it was for the entire country and for much of the world, initial reactions to the attacks on the World Trade Center were little more than shock and disbelief. Particularly for those located so close to the disaster, it was difficult to absorb what transpired that morning.
In response to the events of the morning, student leaders at Yeshiva quickly organized an outdoor Mincha and Tehillim rally. The main speaker at this rally was Rabbi Norman Lamm … There is one thought that he stressed that I have not forgotten. David Hamelech exclaims in Tehillim "keili keili lama azavtani?". [“My God, my God, why have you forsaken me?”] Rabbi Shimshon Rephael Hirsh explains that in Hebrew, one can ask "why" with the use of the word madua or of the word lama. The word madua means why in its purest sense, wanting to know the reason behind something, what caused it to happen. On the other hand, lama comes from the words "le ma," literally "to what," trying to figure out not what caused something to happen, but rather what is the purpose that is meant to come out of the occurrence. And so when David Hamelech feels deserted by Hashem, he does not ask madua. It is not his place to question the causes of the actions of Hashem. Rather he asks lama. What is meant to come out of the actions of Hashem? What responsibilities do they place upon me?
This must be our response to tragedy as well, explained Rabbi Lamm to the hundreds of students and faculty assembled on the lawn outside of Rubin Hall. It is futile to try to understand the reasons or causes for such a horrible occurrence. What we can do, however, is to try our best to figure out the ends to which events such as the attacks of September 11th are meant to bring about in our lives.
In general on this site, I focus on the "madua" - why words came to take the meanings they have. But it is important not to forget the "lama" - what purpose words can have. In the week between Yom HaShoah (Holocaust Memorial Day) and Yom HaZikaron (Memorial Day for Israeli soldiers and victims of terror), this is indeed a very appropriate message.