The key point is to get users addicted to free.
Uber did this by undercutting the entire taxi industry at a loss. Ever wondered why your rides were so cheap!? Jio did the same in India, offer free unlimited internet on their phone service and wipe out the competition.
Docker is popular because it’s free. A lot of people would be upset if they take down their free hosting repositories.
As a user, I want to pay for stuff to sustain companies. They can still be open source.
My understanding (as a complete outsider) is that they raised a $10+ million series A for their PaaS. The PaaS then presumably wasn't successful enough to raise a subsequent round, but one of their technologies (Docker) was, despite the monetization path for it not being clear yet. So they pivoted to focus on that.
I'm not sure what other outcome could plausibly happen in this scenario. If they stuck with the PaaS as their main focus, they would have gone out of business many years ago.