Why did Goddess Durga kill Mahishasura

Why do devi mantras contain the names of the demons she killed?

This doesn't just apply to Durga or Devi. Other gods also have the mantras presented as demon slayers. It is a symbol of their ability to destroy evil and save followers from evil.

Names of devatas have more than one meaning. Durga means invincible. So when we chant "Om Durgaye namaha" not only do we remember how she killed Durgamasur, we also remember that she is invincible and saves her followers when she prays.

Worshiping the gods with such mantras does not mean that we worship or remember demons. The mantras clearly state Mahishasura mardinyai namaha, which means "Om, I bow to him , the Mahishasura killed ". If these mantras are chanted incorrectly, this is a different case.

There are many mantras for Vishnu or Krishna that show that they killed some demons. One of the famous names of Vishnu is Madhusudana. The meaning is "Slayer of Madhu". There is a mantra Om "Madhusudanaya Namaha", which means Om, I bow to the vanquisher of Madhu. This means the attribute of Dushta Shikshana, which is also a duty of God. There are many other names in the Vishnu Sahasranama and other stotras like this one. There are rituals in temples where these names are chanted as mantras in the temples.

Shiva is called Gajantaka and means the one who killed Gajasura. Other gods also name those and mantras associated with such forms.

So it is not entirely correct to say that there are no mantras for Vishnu, Shiva or other gods that are supposed to kill demons.