The free-swimming larval stage (cyprids) have rudimentary eyes which can pick up red flourescent light which, it turns out, is reflected by the shells of settled adults. So possibly the big chap on the right was the pioneer and the rest, looking for a site and potential mate, saw his flourescent beacon, swam on down, cemented their heads to the rock and set up home. I still think it's charming that they've done it in a straight line.
Matsumura, Kiyotaka, and Pei-Yuan Qian. "Larval vision contributes to gregarious settlement in barnacles: adult red fluorescence as a possible visual signal." The Journal of experimental biology 217.5 (2014): 743-750.
The link to the academic paper is here and thanks to the Journal of Experimental Biology for making it available free.