Two reasons. First: sometimes you can see, after you've started whistling, that you're not going to get a full jar, and aborting the action would save some energy.
The second one I'm not *entirely* sure of, but here's my understanding: if you have a partially-filled jar of fireflies, the ones that are released when you re-open it can't be captured in that whistling session, but still exist and can be captured another time. If you have a bunch of partly-full firefly jars, you could consolidate them in a room with a small firefly swarm if you could release the fireflies from each partial jar, close the jar before the few catchable fireflies come in, and only let whistling proceed when there are enough fireflies loose and nearby to completly fill your jar.
This is all moot if you're making bricks rather than crystals with your fireflies.