Motivations
There are a number of reasons that an elected official, or someone seeking office, might choose to switch parties. One reason is ethical obligation when the person has views that are no longer aligned with those of the current party.
A second reason is to gain powers and influences. The
incumbent may be a member of the minority party in a legislature and would like to gain the advantages of being in the majority party, such as the potential to chair a committee. A disaffected incumbent who might not hold a leadership position or feels ignored or mistreated by the majority party might join the minority party with the expectation of holding a leadership position in the minority party and if currently elected, having the complete support of the minority party for re-election, who would certainly want to have more elected officials in their ranks.
Another reason is simply to get elected. This may be the primary reason when the opposing party's
base in a constituency is reaching a size that threatens the safe reelection of the incumbent or the elected official fears being primaried'
https://en.wikipedia.org/wiki/Party_switching_in_the_United_States