It’s possible I didn’t explain myself clearly. I only aimed to clarify the discrepancy in the value of the register; this does not mean you have to use the MCLR pin. If you are just starting and are not yet clear on how inputs work in microcontrollers (MCLR is an input), I think it’s better not to enable it.
The MCLR pin functions similarly to momentarily turning off the power and then turning it back on—it triggers a reset. However, the challenge with the MCLR pin is that for it to work, it’s not enough to simply enable it; it also requires an external pull-up resistor and a push button, at least in its basic configuration for manual use.
A common mistake among beginners is enabling the MCLR pin without understanding that it is an input. Inputs on microcontrollers—and generally on all chips, especially those using CMOS technology—must be polarized, either through an internal or external resistor. If this polarization is not implemented, the input will float, resulting in random states that may cause sporadic resets, driving you crazy in this particular case.