What’s more important (to the people in charge) having a historic museum that might result in (gasp) THINKING? or having yet another shrine to their particular religious preference (the one they use for personal/political power)? You get one guess.
It was a Christian church far longer than it has been a mosque.
Religion and Politics have been joined at the hip for Millennia.