From my very limited understanding, it's essentially because in order to detect it, you have to interact with it.
The collapsing of a wave function means you have a range of probabilities, but the probabilities are removed when you pin point the actual location of the electron (particle) by interacting with it.
You can measure either the momentum or the location, but not both at the same time
Hopefully my info was correct lol, someone smarter should chime in, but that's my understanding.