there is not a blanket requirement in the nec for the ground conductor to be the same size as ungrounded (hot) conductors. for many applications, particularily higher amperage applications, the ground is often much smaller than the pther conductors. for this application, the ground conductor size is a function of the upstream overcurrent protective device (breaker) size. assuming a 50 amp upstream breaker, a #10 awg ground conductor is the minimum size required so a #8 awg ground is just fine. in fact, a #8 ground is standard size in #4 nm (romex) cables.
all that being said, a #4 is overkill for a 50 amp circuit, #6 would suffice. oversizing hot conductors for reasons other than those required by the nec requires a corresponding increase in size of the ground conductor. an example would be 'hey, i only need #6 for this 50 amp circuit but i have some #4 on the truck, i'll just use that. bigger is better, right?' in this example, the nec is not dictating a larger conductor size, the user made that decision on their own. there are instances where the nec dictates larger conductors than would 'normally' be required, such as high ambient temperatures or more than three current-carrying conductors in a conduit. no need to fool with ground size in those instances. but using our example above, the #4 has 59% more cross-sectional area than a #6 so the ground has to increase a corresponding 59%. a #10 has a cross-section area of 10380 circular mils and a 59% increase in size represents 16511 circulr mils or ground conductor area required. in the ultimate lol moment, a #8 has a cross-sectional area of 16510 circulr mils and would thus be undersized for this application by 1 circular mil or, like, a human hair.
so why is this existing circuit oversized?
practically, there is no danger with using the #8 ground but this exercise demonstrates an instance where 'going above code' can cause problems. i personally would have no fears using the circuit.