It isn't guaranteed to solve the problem - in fact, it will only do so in VERY SPECIFIC use cases.
It does it because this process is COMPLETELY REWRITING the PDF. NONE of the original PDF remains, which is why this is an extremely lossy operation. BUT if the font that was used is present on the machine, then that font information is used instead of the bad data in the original PDF.