When does Windows clear this directory? The only time it seems to is when running disk cleanup tool one is given the option..
Windows never automatically cleans the
%TEMP% directory by default. In Windows 10 you have to enable this feature in Settings, and with earlier versions you must delete the files yourself or use programs like Disk Cleanup or cCleaner.