I don't think it's a small motivation of Musk to escape the tax rate when he starts to sell his shares. Just because he vested them while in CA - if he's a resident of Texas when he sells I don't think he owes CA a dime.
I wasn't responding specifically to Musk's tax burden, but the question of why would someone who moved out of the state still be paying taxes to the state several years later.
It depends on what type of shares/options/equity grants, and what's still vesting, and what isn't.
ISOs that are exercised in a qualifying disposition are taxed based on residency on the day of exercise.
RSUs that vest while you're a resident are taxed on vest day, and any capital gains from that are taxed based on residency on the day of the sale, yes.
RSUs that vest while you're not a resident are taxed on vest day, and a portion of the income will be california source if you worked in California during a portion of the vesting period, or if you were a residing during a portion of the vesting period.
I don't think it's a small motivation of Musk to escape the tax rate when he starts to sell his shares. Just because he vested them while in CA - if he's a resident of Texas when he sells I don't think he owes CA a dime.