Why does Merlin figure in That Hideous Strength? I've read some intricate explanations about Lewis's sources of influence (e.g. Tolkien, Charles Williams, George McDonald). I'm not a Lewis scholar, so those explanations may be correct. Of course, Lewis was a complex and impressionable thinker who sponged up many ideas from his wide and deep reading, so these are not mutually exclusive explanations.
However, it's my guess that there's a more straightforward explanation:
i) For starters, Lewis is a British fantasy writer with an antiquarian interest. That alone predisposes him to present his own creative reinterpretation of the Arthurian legend. He was spoiling for an opportunity, and That Hideous Strength gave him an opening.
ii) But over and above that, Merlin is a transitional figure with one foot in the old pagan order and another foot in the new Christian order. That may be appealing to Lewis, who saw an overlap between Christianity and paganism. For Lewis, "myth became fact" in Christianity. So Merlin may function as an evocative emblem of his theory regarding the relationship between history and mythology.
iii) Finally, Lewis has an aversion to technocracies. That already comes through in Out of the Silent Planet. And N.I.C.E. represents technocratic transhumanism.
But over and against that is something more powerful than technology: magic. That's ironic because it's older. Primitive. A throwback to something prescientific.
So Lewis may be using the figure of Merlin to take a swipe at scientific humanism and technological triumphalism. There's something in the world more powerful than science and technology.