Why do they ask?..

Do I need to tell my doctor if I’ve had a miscarriage before? Even if it was about 7 years ago and quite early on in the pregnancy?