It is because the Dutch sentence does not specify a location. In this case "er" tells you about the occurance of something, but it doesn't say that it happened there, or anywhere else. You could use "daar" instead of "er" to give it this meaning:
- Wat is er gebeurd? - What happened?
- Wat is daar gebeurd? - What happened there?
For the second one, you could also use "Wat is er daar gebeurd?" or "Wat is er gebeurd daar?"