Magnetic flux quantization is a quantum mechanical phenomenon in which the magnetic flux through a superconducting loop is quantized in integral multiples of the magnetic flux quantum. This occurs because the wave function of the superconducting electrons must be single-valued, leading to discrete allowed values of magnetic flux, which is fundamental to the behavior of superconductors and is crucial in technologies like SQUIDs (Superconducting Quantum Interference Devices).