>>724094987
Basically Inafune didn't want his character going unused, so she was reworked into a prototype robot that was the source of the "Xel" malfunctions. She serves as the final boss in monstrous form, and she's defeated, rescued, and fixed.
It would allow her to continue on, if the series had any future.
Ray was also "female robot designed earlier than Beck with Xel malfunctions", but in a different direction that made her an edgy homicidal Zero and Bass combo bootleg.