The 8 speaker wires are powered by the OEM head unit with the proper signals the amps wants to see to power and play the speakers with.
When you buy an aftermarket radio plug adapter, the wires will be in that plug. The instinctive decision is to hook all the wire connections up straight to the aftermarket radio. Problem is, the amplified RF system does not want to see high level speaker inputs from the aftermarket head unit. Instead, the solution is to splice RCA plugs onto the 8 speaker wires and then plug the RCAs into the low level RCA ports on the back of the unit.
Here's an example of what I mean (Rockford Fosgate RFI2SW):
View attachment 346209
Every RCA jack itself is two conductors, hence the two wires per each. There are 4 generic speaker locations in a vehicle (front left, front right, rear left, rear right) so you will typically have 8 speaker wires in the stock radio wiring. Your adapter plug that you use to connect the stock radio wiring to the aftermarket radio wiring will contain those 8 wires, but rather than hooking them up to the aftermarket radio pigtail, you splice on RCA jacks like pictured above and then plug the RCAs into the radio. So you would need two of the Rockford fosgate RCA kits pictured above to do all 8 speaker wires / 4 RCA jacks. You would plug them into the front and rear ports of the aftermarket stereo, you would NOT plug anything into the subwoofer port. The stock RF system decides what signals to send to the subwoofer on it's own based on the signals it receives through the other 8 wires.
In my experience, after doing this, I needed ground loop isolators (2 of them) between the radio and the RCA jacks I made. Low level speaker signals from an aftermarket head unit are very prone to picking up electrical noise. The radio wires from the factory run in a thick bundle with a bunch of other wires and are not designed to be low level inputs. Crimping on RCA jacks converts them to be low level so they naturally pick up noise. Ground loop isolators like the PAC SNI1 solved the problem for me. You need two of them, and you plug one in between the front jacks and one in between the rear jacks. The radio area had plenty of room for them to be plugged in and tucked down into the dash.
Finally, here's a pic from my radio project and the custom harness I made. You can see the 8 colored wires branching off of the white radio plug, spliced to RCA jacks, then plugged into the ground loop isolators, and then I plugged the isolators into the radio. The setup works great with no issues for two trucks 1.5 years and 35K miles total now.
View attachment 346210