GDI "trails" are due to specific of how GDI drawing worked before WinNT6 and DWM.
Specifically, applications were issuing drawing commands which were executed directly onto the framebuffer - there was no "draw into rectangle then another process will compose it", because GDI was written for systems that simply didn't have enough memory for that.
Essentially the process looked like this:
1. Windows GUI system figures that a specific window (this could be everything from full application window to individual control) became visible
2. WM_PAINT (iirc) message is sent to the application, to specific window
3. the handler for WM_PAINT of the specific window is triggered (there might have been support for buffering pre-existing draws, too), and executed GDI calls to draw the component (canonically using a state pointer to associated data block with everything necessary for repaint)
4. The GDI system does the drawing directly on the graphic card (either fully in software, or through accelerated calls exposed by driver)
5. Next window that needs painting gets called etc.
This meant that when the applications hanged, or simply didn't have time to process drawing requests fast enough, you ended up with "trails" due to remaining old data in framebuffer.
With WinNT6+ and DWM, GDI applications each draw into their own buffer which is then composited by DWM. This means that at worst they break their own windows' contents, but not the global framebuffer.