There's the risk of infection with any miscarriage. Even if you've stopped bleeding, that doesn't mean that everything is completely gone, and there could still be something to come out and having sex could make that happen - and so there is the risk of infection. That's why they say to wait 2 weeks just to make sure as you shouldn't be bleeding for longer than 2 weeks.
I've had a natural miscarriage and a d&c and I was pretty much given the same rules for both. Both are still a miscarriage and bleeding is a result of them so it's never a good idea to have sex until that is completely gone. It's the same reason as why you shouldn;t have sex on your period - higher risk of infection.
She does not have to wait if she didnt have a D&C. There is no risk of infection in that case.
You're recommended to wait 2 weeks before having sex again after a miscarriage. This is because by having sex or putting anything in there before that time, there is a higher risk of infection. As far as unprotected sex goes, you're meant to wait until you've had your first period after the miscarriage if you're wanting to start trying again. You're period can arrive 4-6 weeks after the miscarriage.
Firstly, I am sorry. I had two myself and it wast horrible! If you plan on using contraceptives, you can have sex now. Unless you have a D&C. With surgery, you have to wait a few weeks and it hurts the first couple of times.
The most important concern is to make sure you dont get pregnant again until you have 1-3 normal periods. This way your doctor will know exactly how far along you are later.
Good luck in life and stay strong. :)