Any Advice??!?!?!?

I was supposed to be 12 weeks when i went for my check up dr couldnt find baby's heartbeat got an ultrasound and found out my baby was only the size of an 8 week old baby why did my body keep carrying a dead baby?????? And why didnt doctors know when she couldnt find a heartbeat at 8 weeks and send me for an ultrasound then????  Past history two cyst removed, sickle cell trait, G6PD and appendix removed