It is not as uncommon as you think. Player is doing well and attracting interest, the club acts quickly and gets a new contract in. The player will usually sign it as he is guaranteed more money and sometimes out of respect for the club.
Clubs higher up that are interested will pay what they think the player is worth. The new contract won’t put them off.