That’s exactly my point though. We might be using oranges instead of apples now if history had been different.
We use both for different things. They don't solve the same problem.
In a different universe we would have been happy with the limitations of html and published everything with a minimal of markup.
For most documents that are published as PDF nowadays, there is only little practical use for them to have a predetermined pagination and layout, and a free-flowing layout would be perfectly fine. If PDF didn’t exist, those documents might instead be typically published in a format more akin to EPUB or MOBI.