I don't know what OP was running but the G5 iMacs were some of the machines suffering from the early 2000s capacitor plague[0]. The power supplies and power regulation on the logic boards would die on those all the time. If you were lucky it was just the power supply but the problem usually needed a PSU and logic board swap.
The processor in a G5 PowerMac came on a card that had the VRMs, capacitors, and a bunch of other stuff on it. It was basically like a tiny motherboard that attached to your motherboard.
Oh no, the last time this happened there were definitely other casualties. The motherboard was left in a particular state of undeath, where it wouldn't quite power on. But if you jumped the ATX header it'd sort of attempt to boot and give some beeps.
After that I added a bunch of grounding to my house and I haven't had that much damage in one lightning strike before.