In the sentence "The girls got a permit to go backstage after the concert," the infinitive phrase "to go backstage" functions as a noun (direct object of "got")—it names the purpose of the permit.
Structure:
It answers "A permit for what?" Without it, the sentence is incomplete.