I imagine they are contracts that heavily incentivised.
If they stay in the current division, wages would X amount, but if they are promoted then wages would be XX amount.
Works out well for both parties with the player earning more than their current wage, but also wanting to get the Club promoted in order to earn more again.
although it makes sense to try and retain the services of decent players, I imagine a part of this is a gamble that their current success will attract scouts and by selling a player with a longer contract, they get a better fee.