Pre-approval is no guarantee of final approval. Often a lender will scan over your application, obtain a copy of your credit and determine you generally fit the criteria as they know them to be. Until all the documentation is collected and reviewed by an underwriter there is always a chance you may not obtain final approval.
A good loan officer will know or learn the specific guidelines for the programs they represent and review the file carefully to improve the chances of final approval. As a Loan Officer for many years, I pre-underwrote my files to detect areas where we would have a concern and address them early on. I did not have many file fall out of underwriting.