AFCI breaker tripped when there was no power to wire
The AFCI worked as designed.  It detected some small arc within the wiring and shut the circuit down.  An AFCI has three detection modes: overcurrent, arcing and ground fault.  Even a small amount of current imbalance will set the thing off.  Be happy.