As already hinted at in the other answers, timed written exams¹ (and every other examination method) are inherently incapable of fully fairly assessing the qualities of interest in a student, as they will always also assess exam-writing skills, psychological robustness, time-management skills and similar. This does however not mean that one should not try to make them as fair as possible.
An important part of this includes having fixed conditions for the exam and informing every student about them beforehand, so they know what they are up to. Changing these conditions without a good reason¹ can avoidably increase the importance of skills that are not of interest. Moreover, it is likely to favour those who have exam-relevant skills anyway (and thus have an unfair advantage through the choice of the examination mode anyway, if you so wish). For example:
- Many students mentally prepare themselves for the exact exam conditions and changing them favours students who can adapt. The latter are mostly students who are not nervous about exams and thus advantaged anyway.
- There are several strategies to go through an exam, for example: Trying to attribute equal time to each task, risking leaving tasks half-finished; taking the easy tasks first; taking the more difficult tasks first and so on. Ideally (i.e., for an exam that is well adjusted to the given time), all these strategies are equally good in outcome; in a regular real situation, some of them are favourable, but at least you can decide the best strategy depending on your skills and psychology; radically changing the rules during the exam may strongly favour one strategy and thus give an advantage to those students who chose it (more or less at random).
Perhaps the above comes more clear with a different, more drastic example:
When I studied, one of the central and most difficult exams was looking like this: ⅔ of the points were attributed to Topic A; ⅓ of the points were attributed to Topic B; ½ of the points were required to pass; there were no grades. Given this situation, there were several viable, but entirely different strategies to approach this exam, e.g.:
- If you were good in Topic A, you could entirely focus on it and try to pass the exam without ever addressing Topic B.
- If you were good in Topic B, you could focus on Topic B and then try to obtain the rest of the points from easy tasks on Topic A.
When I took this exam, the tasks for Topic A were ridiculously difficult (but in such a way that you would not notice until after investing some time into the task), while the tasks for Topic B were rather easy². As a result, only one person or so would have passed the exam with the above conditions and the passing threshold was lowered to ¼ of the points. Due to the latter, the exam became passable by means of topic B alone and in fact many students passed by overly focussing on topic B, i.e., by pursuing a strategy that could be regarded as bad under the original conditions. Students who focussed on Topic A were strongly disadvantaged though. Moreover, even if you were equally good in both topics, you were randomly advantaged if you started with topic B, since most tasks of topic A were mostly a waste of time (but you could not tell without doing them).
Of course the situation described above is different from yours, but I hope that it illustrates how a strong change to the exam conditions can introduce additional, avoidable unfairness. In your example, I particularly see the following problem: Students who alloted an equal portion of the original time to each task are disadvantaged from those who only worked on selected tasks. The latter can just use the additional time to continue with the remaining tasks, while the former have to revisit their existing solutions, which is more error-prone and takes more time as they have to work themselves into the task again and correct existing stuff. Arguably, adjusting the grading scheme would have been the more fair solution.
So, to sum it up, I would regard the change that you described to be unfair in the sense that it poses an avoidable increase to the importance of non-relevant skills and luck. However, you should keep in mind that any other way of damage control with a badly posed exam would have the same effect and the most fair solution would have been not to change anything (probably resulting in disproportionately bad grades or failing rates).
As stated in a comment by O. R. Mapper, some universities do not allow for such changes, probably for exactly that reason.
At my university, this is usually addressed by not fixing the grading scheme, so students know beforehand how damage control is going to happen (though even this may lead to unfairness in extreme situations such as my example).
¹ For example an external cause such as an unforseen and unavoidable major noise disturbance.
² To give you an idea: Despite being far more concise, the sample solutions for Topic A were ten times as long as those for Topic B.