It is a condition of a sound marriage that it be announced and attested to publicly. A secret marriage, which is only witnessed by a few people in private, is potentially harmful to those affected by it, as it almost always involves deception, and it is even more so if a man marries an additional wife in secret and without her consent.
فَانكِحُوهُنَّ بِإِذْنِ أَهْلِهِنَّ وَآتُوهُنَّ أُجُورَهُنَّ بِالْمَعْرُوفِ مُحْصَنَاتٍ غَيْرَ مُسَافِحَاتٍ وَلَا مُتَّخِذَاتِ أَخْدَانٍ
Marry them with the permission of their families and give them their due as is good, chaste women, neither fornicators nor secret mistresses.
Surat al-Nisa 4:25
Scholars have said that this verse prohibits secret marriages, by drawing an analogy between a ‘secret mistress’ and a secret marriage.
Ibn Taymiyyah writes:
وَمَالِكٌ يُوجِبُ إعْلَانَ النِّكَاحِ وَنِكَاحُ السِّرِّ هُوَ مِنْ جِنْسِ نِكَاحِ الْبَغَايَا وَقَدْ قَالَ اللَّهُ تَعَالَى مُحْصَنَاتٍ غَيْرَ مُسَافِحَاتٍ وَلَا مُتَّخِذَاتِ أَخْدَانٍ
فَنِكَاحُ السِّرِّ مِنْ جِنْسِ ذَوَاتِ الْأَخْدَانِ
Malik obligated announcing the marriage in public. A secret marriage is a type of prostitution. Allah Almighty said: Chaste women, neither fornicators nor secret mistresses. (4:25) Thus, a secret marriage is a type of secret mistress.
Source: Majmū’ al-Fatāwá 32/102