I understand that multiplication by a large number before xoring should help with badly distributed operands but why should the multiplier be a prime?
Multiplying by a non-prime has a cyclic repeating pattern much smaller than the number. If you use a prime then the cyclic repeating pattern is guaranteeed to be at least as large as the prime number.