The assumption of 50% of the students being male could have come from the idea that the male to female ratio in population should be around 1:1. We are told that it is “generally assumed”. Basically, the Principal is trying to decide if the actual proportion of male students in his school (sample) is representative of the population (students in the region) or not.
Look at the illustration:
We know that a large and random sample can represent the population well but we still have to keep in mind that it is not an exact representation. We always have to remember sample variability. It means that if we consider a population of one million people with an exactly 1:1 male to female ratio, a random sample of 100 individuals can have 50 males and 50 females, but also 40 males and 60 females. The latter is less likely to occur, but is still possible.
In order to find out the likeliness of any of these combinations to occur we run the simulation. It should help us to find out the distribution of the probabilities of all possible male/female ratios in a sample of 100, or 20, or in our case 343 individuals. If the simulation shows that 194 males out of a sample of 343 students is extremely rare occurrence in the expected 1:1 ratio, we then can conclude that it is likely that the percentage of male students in the region is higher than 50%, taking into account that the sample was random (which may not be the case for this scenario, but it is outside of this question).
It is possible to run the simulation for a probability of 0.5656 and then see how likely it is for a sample of 343 to have 50% males (172.5 individuals); the answer still should be the same. But usually simulations are run to compare theoretical probability (50% males as you would expect in the general population) to the experimental probability (56.56% males in the school). Based on the results the Principal can decide the likelihood of the results he has and make a conclusion about the gender distribution of students in the region.
Also, you are not asked to design the simulation, you need to discuss how the simulation can help the Principal make a conclusion about the population.
I hope that helps!