Hagia Sophia was taken away from the Christians as an act of conquest, but it was built by the noble Justinian.
A better example of a "victory mosque" in Istanbul is the Blue Mosque. It was built on the scale of Hagia Sophia for exactly the reasons you cite.
Thanks, I didn’t mean that they had built it - otherwise it would not be known as Hagia Sophia.