It is extremely common to run XMP profiles on locked and unoverclocked CPUs. Both my systems do this now.
It is a system. Like asking how the engine in a car plays a role with the tires. Many interactions.
Every CPU, memory, and motherboard is a combination of resistances, trace lengths, power delivery, and silicon quality, coupled with the BIOS firmware to run it all.
Memory is tested and sold in kits because they have very tight tolerances for working together at such high frequencies. Did your friend buy matched memory or separate sticks or kits?
Have you tried updating to the latest BIOS version?
Sometimes you need to increase the DRAM voltage to achieve higher clocks, particularly when using more than two sticks of memory. Adding .05-.1 volts or more for very high memory overclocks can be necessary.
You would need to list all the hardware in question for a better answer.