The reference code is the employee code in the bank, which represents an employee of the bank. It is the internal assessment mechanism of their bank. If you enter the reference code, it proves that you bought the relevant fund from an employee of the bank. For the customer himself, it is not important for you to enter the reference code or not.
When I buy a fund on the website of China Merchants Bank, I will also ask you to enter the reference code. I will always enter my friend's code. But even if you don't enter, there is no problem at all.