I think Farmer is on the team because he's a very capable backup all around the infield, and the only one they have who they feel comfortable at SS.
As for Vazquez, quick pop quiz: who had more PAs last year... Ryan Jeffers or Christian Vazquez?
Vazquez isn't a backup, given the way the Twins deploy their catchers. He's excellent behind the plate, and also very likely a better hitter than he showed in 2023. Given the weak catching throughout the major leagues, I doubt the Twins regret the contract.