The tech mogul cited California’s new transgender rights law as “the final straw” for moving out of the state.