Sometimes dogs will lose their front teeth or any adult teeth when they suffer trauma to their mouth such as in a dog fight or even a blow to the head or anything else.
If your dog hasn't suffered any trauma to their mouth or head then the dogs teeth falling out is most likely caused by a disease of the mouth and gums called periodontal disease.
You might want to have your dogs teeth and gums checked out at a vet if you can afford to do so but a dog will be okay without teeth and can still survive eating soft dog food.