Active duty service members have always been able to keep one state as their state of legal residency (usually their Home of Record) for tax purposes even when they move frequently on military orders. A state of legal residence (SLR) is also considered their "domicile" or "resident" state. For more info, see Filing State Income Taxes When You're in the Military.
Nonmilitary spouses can use their military spouse's resident state when filing their taxes. The Military Spouse Residency Relief Act (MSRRA) allows a nonmilitary spouse of a service member to keep the same resident state of the military spouse regardless of which state they live in. The Veterans Benefits and Transition Act allows that choice to be made regardless of when they were married.