What is a dilation and curettage done for?

Failed pregnancy. Usually for failed early pregnancy such as first-trimester miscarriage. It's sometimes used as a diagnostic tool for non-pregnant women with irregular bleeding. There are other reasons as well.