It’s a capacitor bank.
A capacitor is like a battery, but instead of storing electricity as charges separated as two “tanks” of electrons and “holes” like a battery, it stores charge as static electricity on a very thin film separated from itself by a very strong insulator.
The purpose? I don’t know. Beyond killing stuff, I guess it’s fun to have a “weapon”? But yeah, it’s like a camera flash charged by the USB power source until it reaches maximum capacity then discharges.