Praise be to Allah.
Announcing marriages is obligatory and the reason for that is:
1 – The Sunnah enjoins this, because the Prophet (peace and blessings of Allaah be upon him) said: “Announce this marriage.” Narrated by Ahmad and classed as hasan by al-Albaani in Saheeh al-Jaami’, 1072.
2 – So as to distinguish the valid shar’i marriage that is enjoined by Islam from immorality, because zina is done secretly, whereas legitimate marriage is that which is proclaimed openly, so as to distinguish the one from the other. This is the wisdom behind announcing marriages.