Wow, you are right - how you found it. That is very unintuitive! I just tested it and I'm surprised it crashes Photoshop, though I don't see how that process is related to Action Manager document properties :/ Documents surely may be printed, so probably AM initiates / checks / looks for some informations by this simple code in Windows, from which one of them is that for printing.
For those who'd like to test it themselves use
Enabling the Print Spooler Service in Windows | HP Printers | HP to find Print Spooler service and stop it instead of restarting. Then try the provided code on an open document. My Photoshop release is 22.4.2. In CS6 that does not occur.