Your question “why” may not be a good fit for this site, but I’d like to answer it for you and everyone else who has wondered “why, because ground is ground, isn’t it?” Perhaps knowing why the rule exists will make compliance more likely.
The separate grounding rod for an outbuilding that’s powered by a branch circuit from another building is intended to prevent electric shock under unusual circumstances which come into play most often when the outbuilding is far from the main building. The farther away the outbuilding, the greater chance for issues.
You may think of the ground (earth) as a big uniform sink for voltage from any source, but that is not accurate. The earth has resistance, and two widely separated points on the ground can have different absolute voltage potentials if there is a current flowing through the earth.
Earth currents may come from storm clouds passing overhead even without lightning, as the trailing edge of a storm cloud creates a charge reversal as it passes. Solar storms can induce earth currents of millions of amps, and these are powerful enough to burn out utility transformers. Seismic tremors create earth currents. And perhaps most commonly for most of us, nearby lightning strikes produce earth currents. Any earth current from any source, if it passes through the ground at points A and B will create a ground voltage difference between points A and B. Ground over here is not necessarily the same as ground over there.
Imagine the following scenario. Your barn, 500 feet away from your house and powered from the house through an underground 4-wire conduit (hot / hot / neutral / ground) has no grounding rod. Neutral is isolated from equipment ground as required by code. Your conduit’s ground wire is bonded to your barn’s electric panel and to all equipment grounds in the barn, plus all structural steel and metallic water pipes in the barn, in compliance with code.
You’re out in the field on your tractor when it starts raining. You hear thunder so you head back to the barn. By the time you get the tractor in the barn, you’re soaking wet, it’s raining cats and dogs and pealing thunder, so you decide to stay in the barn for now and watch the light show. You lean against the door frame where your soaking wet T-shirt is touching the properly grounded metal light switch enclosure while your soaking wet boots stand in the mud just inside the barn door.
Lightning strikes the ground 200 feet away. Thousands of amps flow through the ground radially in all directions away from the lightning strike causing a voltage difference between any two points, with greater differences between more widely separated points. Your feet in the mud and therefore your whole body are at whatever the ground potential is at the barn, and based on that alone, if you’re not leaning on the light switch enclosure, no harm is done. But back at the house, 500 feet away, the house’s grounding rod is at a vastly different voltage for as long as the lightning bolt’s current is discharging through the ground. The house’s grounding rod, connected through the underground conduit’s ground wire, is ultimately connected to the light switch enclosure that you’re leaning on. And so it’s bye-bye User150936. You just got shocked by a grounded switch enclosure because you weren’t using local ground.
If the barn had its own grounding rod bonded to the barn’s equipment ground, that grounding rod would have maintained all electrical enclosures, structural steel and plumbing at local ground potential, so the light switch enclosure would be at the same voltage as your feet and User150936 would still be around to tell the story of that lightning strike.
For the duration of that lightning strike’s discharge, a large current would flow through the conduit’s ground wire because of the voltage difference between the house’s grounding rod and the barn’s, but since the current would only last a few milliseconds, the ground wire would not be harmed.
The difference between outbuilding ground and house ground is hardly an issue when the outbuilding is just a few feet away from the main building, but the NEC doesn’t know or care how far away the outbuilding is. The rule applies to all outbuildings, with a few well documented exceptions under the code.