Think about this - The flood are able to control electrical impulses, or at least use them to a certain extent.

Perhaps in the High Charity network Cortana learned enough about Flood physiology to thoerize that she might be able to use it/them as a network to live in, even use them to stop the Covies and the Flood.

She may be crazy, but being crazy don't make you change sides, necessarily, just pursue illogical means of furthuring your own cause.