Kelly Swift grew tired of the Los Angeles area a few years ago so she decided to leave—and take her job with her.

Ms. Swift kept her role in health-care information-technology consulting, and her California salary, when she and her family settled in a suburb of Boise, Idaho. Her employer didn’t mind that she started working from home.

Ms....