Exam question implies that a perfect labour market can have wage differentials?
The question (implicitly) assumes that there are relevant skill differences in the population. As you say, it is true that in a perfect labor market there are no wage differences if workers can move freely across sectors.

If your course defined perfect labor markets as having homogeneity of labor and perfect mobility, then the given answer is wrong. However, typically these two factors are not necessarily a feature of perfect labor markets. That usually just means there is no market power on either side.

As the question asks about the case of different labor supplies, there can be no homogeneity of labor nor perfect mobility. Different labor supply is only possible if not everyone can do each type of work, meaning there are more available workers for certain jobs, thereby implying not all workers have the skills to do all jobs. Hence, to the extent that the question assumes supply differences are possible, it also assumes that workers cannot move freely across sectors. That is the reason wages do not equalize according to the answer.