It is important to know the difference between dismissed and discharged. A discharge means that your case has completed successfully. After the discharge, unsecured creditors cannot attempt to collect a debt.
But, a dismissal is not the same thing. A case that is dismissed means something went wrong and the entire bankruptcy case is gone. There is no automatic stay and creditors can attempt to collect the debt owed to them. Foreclosures start up again; repo agents look for the car; bank accounts get garnished.
What can cause a case to be dismissed? After October 2005, when the bankruptcy laws changed, not complying with the requirement to obtain credit counseling before filing for bankruptcy (and filing the certificate with the court), not complying with the requirement to provide paystubs to the Chapter trustee, not complying with the requirement to provide tax returns (and have them all filed, if you are required to file), not obtaining the after bankruptcy financial management course (and filing that certificate with the court), not showing up at the meeting of creditors that the trustee holds, not filing the correct bankruptcy chapter if your income is too high, and a host of other reasons. You can see that it is important to do things the right way. If you take a wrong turn, your bankruptcy case is gone and all the hard work you have done up to that point is for nothing.