Or a concert promoter sells tickets before the event is built, etc.
The purpose is to offset risk. Pfizer didn't have to take a risk on this vaccine, because they had already sold enough of it to cover their development costs. They may have "used their own money", but that ultimately comes down to an accounting technicality for a company that large.
Moderna's initial funding didn't have an order attached to it, not that was disclosed. In August the US Government did go back and actually purchase vaccines under a separate agreement (https://www.hhs.gov/about/news/2020/08/11/trump-administrati...). Also:
> The May 21, April 16, and March 30 HHS agreements with AstraZeneca, Moderna, and Johnson & Johnson respectively include investments in manufacturing capabilities.
(https://www.hhs.gov/coronavirus/explaining-operation-warp-sp...)
https://www.reuters.com/article/us-philips-us-ventilators-id...
If all told the various companies can manufacture a million doses a day it will take a year to manufacture enough vaccines for everyone in the US. By the government pre-paying for the vaccines the manufacturers could spin up the lines when they were in early trial phases. Six months worth of trials means many tens of millions of doses available as soon as the FDA gives approval of the vaccine.
> The arrangement is an advance-purchase agreement, meaning that the company won’t get paid until they deliver the vaccines
They didn't take funding, they signed a contingent contract. Only their own money was at risk.
https://www.nytimes.com/2020/12/07/us/trump-covid-vaccine-pf...