Boiling the broth in both flasks ensured that any pre-existing organisms such as bacteria were killed.
Had the broths not been boiled, both the flasks would have had bacterial growths in them, making the experiment inconclusive. This removal of pre-existing organisms when conducting investigations is still carried out, such as when creating a colony of bacteria on a petri dish or preparing a batch of alcohol through fermentation.