Remember revenue is recognized if it is realizable and earned. In this case, the company would receive the cash and, since it did not provide the services or deliver the goods, record an offsetting balance sheet entry, which would be a liability in this scenario. Once the company actually delivers the good or service, it will then reverse that liability and record a revenue.
The unearned revenue account is created when revenue
comes in before the product or service is provided. Because that cash has come
in, the company owes a product or service to the customer (and will have to pay
back the money if they do not come through). Like any obligation, unearned
revenue is a liability.