Houston lawyer Anne Ferazzi Hammett spent about three months last spring looking for a great high school for her teenage daughters, Anna and Nora. Then she discovered Westlake, a high school that gets top marks in academic rankings and draws strong reviews from parents.

The only drawback: The school is located in Austin, Texas, about 165 miles northwest of the Hammetts’ home. Nonetheless, Ms. Ferazzi Hammett and her husband, Rick Hammett, bought a $2.25 million house in Westlake’s school district, and they and their daughters...