One reason could be to protect the person he marries. If she's a commoner, for example, the noble society in Camelot might not accept their relationship. So, they keep it a secret. Another reason could be that the person he marries has some sort of power or identity that could put them in danger if it was known. For instance, if she was a sorceress, in Camelot where magic is feared, they'd have to marry secretly.
In some fanfictions, it could be due to a prophecy or a magical bond that they discover. They might feel that the only way to fulfill the prophecy or strengthen the bond is by getting married secretly. Another aspect could be the political situation in the wizarding world. There could be political factions that would oppose their union for various reasons, such as Harry being seen as a symbol of a certain side and Fleur being from a different background. So, to avoid political turmoil or to keep their relationship safe from political manipulation, they choose to marry secretly.
One possible plot twist could be that Merlin is carrying a child with magical powers far beyond what anyone has seen. This could lead to a race among the dark forces to either control or destroy the unborn child, while Merlin's friends strive to protect him and the baby.
It could also be due to the lack of proper rest. Merlin is usually depicted as a very busy character in fanfiction. He has duties in the castle, like serving Arthur, and on top of that, he has to use his magic to help those in need secretly. With so much to do, he might not have enough time to rest, leading to exhaustion.
One possible reason could be a magical curse. In many Merlin fanfictions, magic is often used as a plot device. A dark sorcerer might cast a spell on Merlin to make him forget certain things, perhaps to prevent him from using his powerful magic to oppose them. Another reason could be a self - imposed forgetting due to trauma. Merlin has witnessed and endured a great deal of pain and suffering. To protect his own mental state, his mind might subconsciously block out certain memories.
Maybe to protect her from his enemies. If his foes knew about her, they might target her.
It could also be due to some past trauma. Perhaps Merlin has been through an experience where Arthur was involved in a way that now makes him flinch. Like, Arthur might have accidentally hurt Merlin during a battle training in the past, and now Merlin flinches whenever Arthur makes a sudden move.
One possible reason could be that in the fanfiction, Hermione has different career aspirations. She might be so focused on her magical research or her work in the Ministry that she feels marriage would hold her back. For example, she could be on the verge of a major discovery in the field of spell - modification and doesn't want any distractions.
He could secretly marry Hinata. In the original series, they have a connection, so in fanfiction, it could be a scenario where they elope or have a secret ceremony for some reason, like to avoid political interference in their relationship.
One possible reason could be a magical curse. In the world of Merlin, there are many dark sorcerers who might target Arthur. Another reason could be a poisoned weapon. If he was injured during a battle, the poison on the blade could make him sick. Also, it might be a result of some ancient plague that has resurfaced in Camelot.
One possible reason could be the extreme pressure he faces. Merlin has to constantly hide his magic in a world where it's feared and persecuted. This secrecy and the fear of being discovered might have built up to a point where he feels there's no way out. Also, his loyalty to Arthur might play a part. If he feels he has failed Arthur in some way, like not being able to protect him fully from threats, it could lead to such despair.