Something opens the /dev/video# devices during boot, and when those are open, the selected camera sensor is powered up. Powering up the back camera will shift the autofocus lense quickly, resulting in a "click" sound.
For example on Arch Linux, it's systemd or udev that opens the video device. (v4l_id program)
I have support for both cameras in my kernel, and it seems that the default camera is the front one for me, for whatever reason. So I don't hear any clicks, because front cam doesn't have autofocus.
If you don't like it you can comment out udev rules that call v4l_id program.
For example on Arch Linux, it's systemd or udev that opens the video device. (v4l_id program)
I have support for both cameras in my kernel, and it seems that the default camera is the front one for me, for whatever reason. So I don't hear any clicks, because front cam doesn't have autofocus.
If you don't like it you can comment out udev rules that call v4l_id program.