إِذْ قَالَتِ امْرَأَتُ عِمْرَانَ رَبِّ إِنِّي نَذَرْتُ لَكَ مَا فِي بَطْنِيWhy is the final t written with tā' ت in the first case, and with tā' marbūṭah ة in the other? In Classical Arabic and in every Qur'anic reading tradition I know of, both are pronounced with the same final consonant, t, followed in both cases by the same case vowel, u. Only at the end of a phrase or line is feminine -t- pronounced h, and that is not possible here. However, in almost every spoken Arabic dialect in use today (there are a couple of exceptions in Yemen), the word for "woman" - along with most other feminine nouns - is pronounced with a final consonant t in 'iḍāfah إضافة contexts like the first one (ie when possessed), and with no stop a(h) in other contexts like the second. In Algerian Arabic, for example, "the wife of Imran" would be məṛ-t ʕəmṛan مرت عمران, whereas "a woman" would be mṛ-a مرا. If you examine all the Qur'anic occurrences of this word on the QAC, you will quickly note that imra'at- is written with a tā' ت if and only if it is possessed, ie in 'iḍāfah, and otherwise is written with tā' marbūṭah ة.
when the wife of 'Imran said, "My Lord, indeed I have pledged to You what is in my womb" (3:35)
وَإِنِ امْرَأَةٌ خَافَتْ مِنْ بَعْلِهَا نُشُوزًا أَوْ إِعْرَاضًا فَلَا جُنَاحَ عَلَيْهِمَا
And if a woman fears from her husband contempt or evasion, there is no sin upon them if they make terms of settlement between them - and settlement is best (4:128)
However, whereas in the dialects this is true of almost all feminine nouns, in the Qur'anic text it seems to be much more restricted. Contrast nāqat- ناقة "she-camel" or ṣibġat- صبغة "colouring", which are written with tā' marbūṭah ة throughout, including when possessed. For jannat- جنة "garden", there is at least one case of an 'iḍāfah with tā' ت:
فَرَوْحٌ وَرَيْحَانٌ وَجَنَّتُ نَعِيمٍOther cases, however, are written with tā' marbūṭah ة:
rest and bounty and a garden of pleasure (56:89)
عِنْدَهَا جَنَّةُ الْمَأْوَىٰ
Near it is the Garden of Refuge (53:15)
How is this state of affairs to be explained, given that not only all the reading traditions but even the orthography of hamzas confirm that Qur'anic Arabic kept the case endings? No doubt the question can be - and probably has been - extensively debated, but on the face of it, it looks as though the scribes were familiar with two dialects: that of the text itself, presumably a high register of the dialect of Quraysh, and another one - perhaps a low register, or perhaps the dialect of another, more literate region - which, like modern colloquial Arabic, had already dropped case endings. The latter was not prestigious enough to be used for reading the Qur'an, but was sufficiently well-established in writing to influence its spelling. والله أعلم.