We get where explained where a lot but not why. In this case some why will help with where. Feel free to jump in as I am not always clear.
So,,, the goal here is to keep all the neutrals in a second panel insulated. Note the white wire is coated. Insulation g them keeps all the operating currents on the wire they are intended to and not exposed to the frames and chassis of equipment.
The ground wire, green or bare is hooked to all the exposed.metal that has the potential to become energized at the same potential,,, think spider Web with all tied together and providing a low impedence, low resistance pathway back to its source, neutral at service main which allows the current to trip the breaker in the event of a fault,, or short circuit. By being grounded in this web there is no difference between any 2 pieces of grounded equipment including the panel enclosures.
Now the rods. They are tied to the equipment ground, anything connected to.them would be grounded and along with their primary purpose of carrying lightening and static to earth they reduce some of the step potential between equipment and the ground, concrete you are standing on. The idea of caring strikes there is to reduce the chance it is carried back to the main thru the ground wire.