Usually "why" and "how" have different meanings but I wonder whether the sentences "Why did this happen?" and "How did this happen?" have the same meaning I think it both ask what caused this issue.
The two sentences are definitely close in meaning, and in some cases either could be used; but they do have slightly different connotations:
- "Why did this happen?" is asking for reasons, and perhaps an attempt to find some kind of meaning to the event. Answers might be "it happened because God/Allah/etc willed it", or "it happened because that's the way the stars aligned", or even "there is no reason, it just happened".
- "How did this happen?" is asking for causes; it sounds more practical and specific. Answers might be "it happened because the driver of the other car wasn't paying attention", or "it happened because the safety inspection wasn't adequate".
- With a different emphasis, "how" might actually be more emotive - you might express shock at something by saying "How could this happen!?"
- Lastly, "how" could have its usual meaning of "in what manner" - asking for the process, rather than the cause. For instance, "how did Brexit happen?" could have the literal answer of "by the British parliament submitting a declaration to the EU under Article 50".