That's kinda the point.
Haste grants an extra attack. On the players turn, if the player wants to use it. The player is not bound to any obligation to use it if they had other intentions (cast a spell, flee in terror, whatever). If Bob the Warlord, says "Tracy paladin, roll an attack and add d4...