Do you realize that Ramses and Nefertiri are probably brother and sister?
Well, why else would she be living at court, and expecting to marry the guy who became pharaoh? Think of another explanation for her position.
Because yes, some of the ancient pharaohs married close relatives to keep the bloodline "pure". And Cecil B. DeMille liked to sneak some spice into his films, and disguise them with religion and sanctimony.