I would find it easier to answer in the Portuguese forum, with direct equivalents, but I'll test my English skills..
"What ..for" asks about an intended outcome or purpose or use. We ask, for example, "What is the hammer used for?"
It is used for hitting or driving nails or other objects. The intended purpose or mission is in the answer.
"Why" simply asks for an explanation of something. Why do we eat? The explanation tells us the cause for eating, such as abating hunger, or for nutrition or survival. Why questions may also elicit replies that address motives, but not necessarily usage or purpose.
Could you tell me any examples of the following questions patterns: