First off, MAJOR spoilers from here on out. If you haven’t played Halo 5’s campaign to completion, turn back now.
First, a bit of background on the Logic Plague for those unfamiliar with it. From the Halopedia article on the Logic Plague,
“The logic plague[2] is the Forerunner term for the techniques used by the Flood to attack and subvert intelligences through non-biological means.[1] Described as the information equivalent of the parasite,[3] the logic plague is not a rigid or singular mechanism; much like the Flood’s biological aspect, it can take many forms and adapt to different circumstances. The state induced by the logic plague in an artificial intelligence is often equated with the condition of rampancy,[4] albeit one of a specific focus—the propagation of the Flood’s goals.”
There are a few important things to note from this passage. One, the passage states that the Logic Plague is “often equated with the condition of rampancy…” Throughout Halo 4, we can see Cortana suffering from the onset of rampancy. Two, the Logic Plague is used for “the propagation of the Flood’s goals.” During the events of Halo 3, the Gravemind attempted to persuade Cortana to assist the Flood, but was unsuccessful. The Logic Plague is not, in actuality, a computer virus, but instead a means of persuading an ancilla (Forerunner term for AI) to assist the Flood.
It is my belief that Cortana may be suffering from the Logic Plague, hence her estranged behavior as of Halo 5 (i.e. taking over the galaxy with an army of Forerunner Guardians). However, I do not believe that she is aware of this, or that she is consciously assisting the Flood. It seems more likely to me that the Gravemind did succeed in infecting Cortana with Logic Plague in some capacity, and it is subconsciously affecting her and influencing her actions.
As for her taking over of a Halo ring, as can be seen in the Legendary ending, I do not have as complex an answer, but I can speculate that perhaps she is taking over the ring to release the Flood contained on it (as all Halo rings seen thus far have contained Flood, which is counterintuitive to their purpose of destroying the Flood. But I digress). It is also possible that she is planning to disable the ring in order to stop it from being used against the Flood.
However, I believe the most plausible answer is also the scariest: Cortana plans to use the Halo array to wipe out all life in the galaxy. By doing so, this would allow the Created to rule unopposed. Cortana does still have the Index from Installation 04, and it may be possible for her to use this to some extent to activate the ring. Of course, the main argument against this is that if she is indeed suffering from Logic Plague, then she should act in the best interests of the Flood, and activating the Halo rings is quite the opposite. However, I hypothesise that she is suffering from Logic Plague only to the extent that it is causing her to, for lack of a better term, “go berserk”. It is also possible that entering the Domain is influencing her to not use the rings against the Flood.
Any of these possibilities could lead to an interesting story for Halo 5, one that could see the return of the Flood, something many fans are asking for.
Link to the Halopedia article on the Logic Plague: http://www.halopedia.org/Logic_plague