Why is it necessary to enter the date and time on the D5100 after charging the battery?

Every time I recharge the battery, when I start the camera, do you ask me to enter the date and time? Why? Is very annoying.