The answer lies in the uncertainty principle, which itself is a consequence of the fact that all particles have a wave-like nature, and if their wavelength is short (that is, if their position is well-determined) then they must possess very high momentum (that is, high velocity).
The electron is much lighter than the proton. If we knew its position to the accuracy of the proton, then its velocity would be so high (from the uncertainty principle) that it would easily escape the proton’s pull. If the velocity is low enough for it to remain bound, then its uncertainty in position is 100,000 x larger than the size of the proton.
In quantum theory, the electron in a hydrogen atom does pass through the proton, occasionally. But from its velocity, it escapes out. There is no known interaction of a low energy electron with a proton that would destroy either particle, so the electron simply “slingshots” back out.
Nevertheless, there are examples of electrons being absorbed into the nucleus. The process is called “electron capture”, and it happens when the nucleus can absorb the electron without violating energy conservation