Misaligned gun, high-g maneuver, round misfires/cooks off somehow. It happens.
I remember reading a story from Adolf Galland, about his ground crew working on the synchronization of his machine guns firing through the propeller. He took the plane up, fired a few rounds, got some really bright flashes and thought "Man, my ground crew really did a great job!" When he landed and shut down, only then did he notice that each propeller blade had a big chunks shot out of it - his crew screwed up the synchronization, and he almost shot himself down.