[T]he wavefunction of the electron in [a] box can penetrate into the walls. If the walls aren’t too thick, the wavefunction can actually extend right through them, so that it still has a non-zero value on the outside. What this tells you is that there is a small chance – equal to the amplitude of the wavefunction squared in that part of space – that if you make a measurement of where the electron is, you might find it within the wall, or even outside the wall.
Everything that seems strange about quantum mechanics comes down to measurement. If we take a look, the quantum system behaves one way. If we don’t, the system does something else. What’s more, different ways of looking can elicit apparently mutually contradictory answers. If we look at a system one way, we see this; but if we look at the same system another way, we see not merely that but not this. The object went through one slit; no, it went through both. How can that be? How can ‘the way nature behaves’ depend on how – or if – we choose to observe it?
Wavefunction collapse is a generator of knowledge: it is not so much a process that gives us the answers, but is the process by which answers are created. The outcome of that process can’t, in general, be predicted with certainty, but quantum mechanics gives us a method for calculating the probabilities of particular outcomes. That’s all we can ask for.