This is one of the most common misconceptions among mortgage borrowers.
When most people talk about "closing" their mortgage, they are talking about going to the escrow company (or in some states, the attorney's office) to sign the final loan documents.
This is actually the "signing date." The loan does not "close" until all the documents are officially recorded at the county records office.
Typically, the loan documents must be sent back to the lender for final review before they are cleared to be recorded. This usually takes a day or two, sometimes longer. Once the lender's funding department has concluded that all the documents have been properly signed and everything is in order, the escrow officer is given the "OK" to record the documents. The mortgage documents are then taken to the county recorder's office where they are stamped and filed for public record. That is the official "closing date" of the loan.