Ok - I think I can help clarify. So you got your data up to iCloud and it lived there happily for some time. You would access some parts of it on different machines and view or edit it. When you did that a copy of the iCloud document you edited would be downloaded to your machine that was accessing it and when you hit save it would copy back up to iCloud. Eventually that local copy would go away and then there would only be the iCloud version of that document and all the rest. This was usually just a relatively small file and you wouldn't even notice the hit to your disk. Your apps that you manipulated the docs with live on your mac or iPhone or whatever so it makes sense that you'd download, do work, then it would upload to iCloud and sync to any machines that wanted to keep a local copy on their local drives and those that diid not would just view those iCloud docs from afar in Finder until the files were viewed or edited just like on the other machine, then they would have to be downloaded. Makes sense. If you work on something, it has to be local (or at least local to the app that does the work). When you save it goes back up, then drops from your local machine after some timne. This is all handled by the OS pretty seamlessly so you don't even think about it.
So what is compression? Its an little app with a singular purpose and is kinda invisible to most people and is integrated into and lives behind buttons in the finder, which leads us to think its not an app doing work on files, that it
Just Happens. That it actually lives locally on your mac or iPhone and works (really hard) on all the files you give it to work on as a batch, compressing and kinda stitching together for the sake of the single compressed and boxed up .zip or .tar. But it usually needs all the work you give it all at once and then it goes in on that batch. Compression is an app that needs all those files at once to compress them and put a bow on the one file that comes out the other end. Compression is not magic that happens on a disk drive in the iCloud data center., There are no apps that sit on servers doing work up there. (There are web versions of the Apple apps and a few other stuffs that do sit in some data center somewhere, but not anywhere near high capacity, highly optimized storage nodes and racks in the iCloud datacenter. Just like when you download a doc to work on it locally, that doc goes to another data center and sits on a web server while you work on it, then goers back tio iCloud. There's even 3rd party compression apps that you can buy or rent on like the web version of One Drive, but thats the same connect.
So essentially what you did was ask your local compression app on your local machine to compress everything up there on iCloud, but it needed to download all of it to compress it, then upload the compressed file back up to iCloud so it would seem like it magically happened there (Apple loves to make things look like magic, but ends up confusing the hell out of people where theres even the slightest unique usage or if there's a hiccup or error of any kind because they don't lay the working of stuff more bare so its obvious whats going on with your files, so people get frustrated).
Anyway, hope that helps. Those file copys the compression app worked on, if they aren't visible in your finder, then do a search for a known file name in that bunch and see if you can locate where that cache is. Its too bad that app wasn't smart enough to actively delete that cache of stuff because of the number and size of them and what that would do to your machine's performance. Maybe empty the trash?
This guy is a genius and he writes little blog posts about how apple stuff, macs especially, really work:
https://eclecticlight.co/?s=iCloud
And he writes little utils to help Mac users get by:
https://eclecticlight.co/downloads/
Check these out. These are for iCloud specifically:
https://eclecticlight.co/cirrus-bailiff/
Anyway, good luck.