In Halo 5, we see...
many human AIs defecting to Cortona.
Why didn't Roland leave the human army as well?
52 Answers
From what we can see, they were given the choice and he simply chose not to. Roland is one of the few "Smart" AI, capable of decision making processes to equal that of humans. So he pretty much saw the real threat and decided not to side with it.
Additionally, Roland is still a pretty young AI and not at risk of Rampancy for quite some time. Many of the defecting AIs, especially the ones the game made a point to show are already going Rampant, which this new threat promises to cure.
It's very possible that since most AI are very aware of AI degradation, and that Cortana had found the "waters of life" for her via assuming the Mantle's responsibilities, it could very well be that the AIs that have sided with Cortana seek the same rejuvenation, and of course are then drawn to her ideology.
We can see this happening in the mission Evacuation where Governor Sloan, when confronted, fully supports Cortana's plan for galactic peace and has chosen to side with her, thinking it will help him as well.