Why does «الْمَسَاجِدِ» take kasra after بِـ?

Diptote Causes — Ultimate Broken-Plural Patterns