Typically, a Member of Congress who has campaigned against earmarks will stick with that position, but a few things can cause a rare change of heart:
- Losing an election (but returning to office in a future campaign, with a new approach to politics and governing).
- Spending a long enough time as an incumbent that they see a benefit to changing but do not fear a primary challenge (very rarely occurs).
- Some other life event that causes them to rethink everything about their political career (also very rare).
- Nearly losing an election and having to politically reevaluate how to demonstrate commitment to the district or state (most common of the options).
An example of the last possibility was reported by Colorado Public Radio:
…opening the door to earmarks is a change for Boebert who, in 2021 and 2022, wrote op-eds calling earmarks “wasteful” and “corrupt, self-serving legislating.” However, after Boebert barely won reelection last year, the message from some voters in her district was clear: They wanted a representative less vocal in political fights and more focused on delivering for the district.
https://www.the-journal.com/articles/rep-lauren-boebert-opens-the-door-to-earmarks-after-calling-them-wasteful-in-previous-years/