Microsoft's Raymond Chen, on his blog, explains what happens during the Windows Update Cleanup (Cleanmgr) process.
Why does the Disk Cleanup tool's Windows Update Cleanup take so long and consume so much CPU? - The Old New Thing: https://devblogs.microsoft.com/oldnewthing/20200922-00/?p=104252
From Raymond Chen:
<quote>
The other thing that the Windows Update Cleanup task does is check with the WofShouldCompressBinaries function to see whether the system would benefit from compression of system files. If so, then it takes the operating system files that aren’t already compressed and compresses them, storing the result in the WofCompressedData alternate data stream, as I described some time ago.
The compression algorithm used by the Windows Overlay Filter is higher quality than a real-time compression algorithm, and it’s designed so that decompression is fast, but compression is expensive. And that’s the cost: You need to spend a lot of CPU time to do the compression, which is why the Windows Update Cleanup is using so much CPU time.
</quote>