Upon inspecting my light bulb socket in the garage of my new construction home (2018), I found a random grounding screw which wasn't wired to anything but attached to some bar. Does anyone know what the grounding screw and the bar it's attached to is for? In fact, the ground wire wasn't connected to anything.
The bare ground wire in the electrical box is supposed to connect to the green screw on that short metal bar. The body of the light fixture is meant to be grounded through the mounting screw that goes into that metal bar. Do be aware that this technique of grounding the light fixture would have been the technique used in older installations. These days a light fixture will have a separate green or bare grounding wire that can be connected directly to the bare copper wire in the electrical box.
You may want to inspect that old light fixture and see if there is an existing screw or mounting hole to which you can add a separate grounding wire. You would then connect this added wire to the bare ground wire in the electrical box.
In the case where you're daisy-chaining multiple boxes together, that terminal block would be used to bind the grounding conductors of all the cables together, along with the grounding wire of the lighting fixture, if it had one.