The format understands spaces just fine. The problem is that programs that produce PDFs are often designed just to make the PDF look correct, without any care for semantics.
I think there's just a bunch of history here--print is the use case that you really want PDF to get correct, and so you take existing print pipelines which discard semantics and add PDF as a new backend. This is the easy/lazy way to get PDF working, and there are also tons of PDF pipelines are just stapled onto the end of a print pipeline as if PDF were another type of printer.
You'll see a night and day difference between one of those pipelines and something more suited to processing a document with semantics, like FrameMaker. FrameMaker seems to be a bit more niche now that print documentation is less mainstream.
I can understand why the PDF ecosystem is a bit frustrating, but I still prefer it when I'm reading academic papers explaining some algorithm or mathematical concept.