Many popular formats (.jpg,.pdf,.docx) use outdated methods of data compression.
So it started making sense to remove that outdated compression and apply better one.
Then do it backwards to restore the file.
It usually only makes sense to do it losslessly, because it is impossible to automate otherwise -
some other file always can contain a hash of this one, or something.
And that’s what we call “recompression”, while lossy transformation would be called “re-encoding”.