Because in an em wave the electric and magnetic fields are both perpendicular to each other as well as to the direction of travel. There are other modes where this isn't true, but I have the feeling they aren't asking about these more complex cases here.