Allah, the Blessed and Exalted, says: "And if they are pregnant, then spend on them until they deliver their burden." [Surah al-Talaq: 6]
So Allah Almighty fixed maintenance for them on the basis of a particular condition (i.e. pregnancy).
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النفقات / Q15712