Amniocentesis for lung development

D
My doctor wants to deliver early (37-38 weeks) because my baby is big but he says he will have to do an amniocentesis to see if the babies lungs have developed. I don't understand why because babies are born at 37 or earlier all the time and are fine. I just don't want an amniocentesis. I decided I would just wait it out and let him come on his own or wait till 39 weeks and the doctor said I feel like your baby may be better off out instead of growing more inside. I'm so confused.