Often close quarters infantry with javelins (like legions, scutarii etc) will not charge when ordered, they will throw their missiles and then charge. Or more likely repare to throw and then get charged themselves due to the high movement speeds. They will even do this when they have no ammo on occassion.