Not sure X.A.N.A. is evil, per se. Put simply, X.A.N.A. is a very clever computer program that went out of control, attempting to take over the world. However, it was initially created to help Franz Hopper, so it's likely it wasn't supposed to go so..."crazy".