Why does the mīm rule differ in these two passages?

Al-Māʿūn and Al-Humazah: Applied Assimilation, Concealment, Madd and Hāʾ Rules