What causes "dieseling"

I have never had a diesel issue but it seems that hot spots in the combustion chamber (carbon buildup, too hot of a spark plug, sharp edges on the valves or pistons and the throttle blades being open too far at idle (due to several causes) would provide the things needed to keep an engine running with the ignition shut off.

I'm not sure how advance world have any effect once the key is turned off, but again I have never had that issue.
Lots of emission era engines had this problem. Timing at or close to TDC and the throttle opened more for a higher idle. An idle solenoid can fix it to comply with emissions. If an emissions test is not an issue, take 5° to 10° out of the mechanical advance and set initial to 8° to 10°BTDC. Reset the idle speed and mixture.