The answer is stupidly simple, but I didn't know it until just yesterday! Whether you're training Stable Diffusion LoRA models like I was, or executing any script using the Windows system terminal, now you know why does the cmd window sometimes seem to stop program execution and pause or freeze "at random".