Yes, if you both want to keep your meaningful work it generally ends up being the more scarce opportunity determining where you move. That's assuming there is a location where jobs X and Y both exist.
For example, my friend is a civil engineer. There's lots of civil engineering jobs in the US, but his wife works as a chemical engineer. Chemical engineering jobs are largely where either oil/gas deposits are, or large amounts of water (water for processing and/or waterways/railroad for shipping). So I imagine for them it will be where ever she needs to move he'll need to follow, versus the other way around, lest they end up in some place where she can't use the degree she spent 4 years getting.