This part is an electrical relay. Its some aftermarket thing, can be from an aftermarket alarm or alike.
Normally the factory relays are mounted on the junction block (above the fuses) and on the PDC (under the hood)
JEEP Grand Cherokee 4.7 Lmtd 2004
HID 8000K in low and fog / Quad Squad member
KYB Gas-a-Just shocks / Pirelli Scorpion ATR 245/65/17 - Transgo reprogramming shiftkit.