When entering a boss room in TP, there is always a cutscene before the fight starts, either immediately after entering or tied to a trigger. Skipping a cutscene often reloads the area with a fadeout in order to avoid bad-looking transitions. However, this could create an issue: Since the area is reloaded, it would be treated as though the cutscene never played, and, as a result, the cutscene would end up playing again (either immediately or through the trigger). This would create an endless loop that couldn't be broken except by not skipping the cutscene.
To avoid this, the programmers used flags for breaking out of this loop. When skipping the cutscene, while the area still reloads, it also sets a flag to a high number and quickly counts it down to zero. When the area reloads, the cutscene that wants to play checks the flag, and if it's nonzero, then the cutscene will not play again. This starts the fight immediately, breaking out of the loop. This flag is also used in the same way if the player voids during the fight to avoid the same issue.
The bug that exists in this flag's use is that when the player resets, the flag stops counting down and is therefore held at a nonzero value. As the reset fails to clear the flag either, we can therefore reset after the flag is set to a nonzero value before it returns to zero and keep it. This is the basis for all of the Early Boss Fights (EBF) used in TP.
As a note, while this flag is mainly used for boss introduction cutscenes, it does have uses elsewhere. The Sacred Grove uses the flag as a binary check. When the Skull Kid chase in either Grove 1 or Grove 2 begins, it sets the flag to 1, and voiding or dying in the Grove will reset the flag to 0, forcing the player to start the sequence again. However, the game fails to clear the flag once the player clears the Skull Kid chase, thus leaving the flag at 1. And as with the boss fights, resetting while this flag is 1 will retain its value.
Resetting such that you skip the introduction cutscene after the reset begins but prior to the reset fully taking effect will also give the flag a high number for the same reason as above.
A fast method for performing this using the introduction cutscene of King Bulblin 1 is to hold X and B entering the cutscene, then hold Start in order to trigger the reset. After the reset triggers, mash Start to skip the cutscene. On Wii versions, wait until the cutscene is skippable, reset the console through either the HOME menu or the console's reset button, then mash - to skip the cutscene.
To save memory, the game uses the boss fights flag to check how many monkeys the player has saved. Using the King Bulblin 1 fight for EBF will set the flag's value high enough to get four monkeys from the start (as four is the maximum), which allows the player to swing over to Ook when visiting the outside area for the first time. Note that skipping the cutscene will reduce the flag's value by 4, so the flag's value needs to start high enough that there are still at least 4 monkeys afterwards.
The Deku Toad miniboss fight also checks the flag. EBF skips the entry cutscene where the vault shuts behind Link and the tadpoles drop, allowing the player to trigger the fight from anywhere in the room (including the exit) by looking up at the ceiling in first person, as Deku Toad is already on the ceiling due to the vault door cutscene having been skipped. Any form of EBF will work here, as the flag only needs to be nonzero in this case. Note that on the USA Wii 1.0 and the PAL Wii versions, having EBF set prevents the player from entering the room via the normal entrance as the vault door is closed. This behavior was fixed for all other versions of the game, including all GCN versions.
Having EBF set in a few cases can be a detriment, as some things fail to play out as intended due to the EBF flag being nonzero. Some examples:
In addition, some fights ignore EBF entirely.