Is a 32.768k crystal necessary?

Is the 32.768k crystal necessary? Is this crystal only used for the RTC?

If the RTC is not used, using the two pins as I/O, does it affect other functions of the chip?

The 32kHz crystal oscillator is not only used for RTC but also for Bluetooth and low-power applications. Although not necessary, having it results in lower power consumption.

If it is confirmed that the 32kHz crystal oscillator is not needed, it can be used as a regular IO.