Couldn’t the camera sensor be turned on and off at will?

Edit: Thank you for your answers everybody!