Why is abnormal amniotic fluid volume an indicator of congenital abnormalities?

Why is abnormal amniotic fluid volume an indicator of congenital abnormalities?

Lack of fetal urination results in oligohydramnios
Lack of swallowing or upper gastrointestinal obstruction by the fetus may lead to polyhydramnios