One thing I’ve learned about politics in the past few decades is that most successful career politicians are weathervanes - ie, they point the direction the (political) wind blows.
This is by design in a democracy. However due to political parties, the pol may simply attach to the most powerful sub group they can use to parley themselves into re-election. So they often double down on their existing stances to keep/grow their core voting bloc.