In "Sleeping Beauty", Tchaikovsky came up with a shorthand way of deciding if a piece was intended to advance the plot or give the dancer a chance to show off his or her chops. In that ballet, numbers in keys related to A Major are to advance the plot, and numbers in keys related to B-flat Major are there for the dancers to show off.
If you have perfect pitch, you don't even need to watch the ballet to know what Tchaikovsky's intent was.