In Harry Potter and the Philosopher's Stone (Sorcerer's Stone in US), the third-floor corridor is forbidden because it guards the Philosopher's Stone—an alchemical artifact that produces the Elixir of Life and turns metal to gold.
The restriction protects students from lethal defenses and prevents the Stone's theft.