The term "allegory" is borrowed from the interpreters of the day, but the substance is Christian and apostolic. It is most assuredly typological and Christocentric; it is apostolic and a proper model for faithful exegetes. It isn't everything a proper hermeneutic should incorporate, but it is an important element.
Paul is dealing with opponents and detractors, in shorthand these are the Judaizing party. Part of what gives such men there supposed power to persuade is that they claim to be the proper interpreters of Scripture, and Paul has it wrong. "Jesus Messiah came, yes indeed, to do important work, no doubt; and his most important work was to bring even the Gentiles unto Moses, and the Law." Jesus isn't central enough to their hermeneutic.
Strict allegory, foisted on the text (which was basically OT Scriptures at that point) makes the guy who is cleverest at spinning a believable tale an important teacher in a group. We are seeing Gnostic tendencies flowering among this sect, would-be teachers in possession of secret knowledge or the key to unlocking the mysteries. It is against this backdrop--these claims by the false teachers of the Judaizers, with their "allegories" of the text, their "superior understanding" to the apostles--that Paul announces his "allegory."
As if he said, "These guys have bamboozled you with what? That? Oh man! Who has bewitched you? I can hardly believe what you people have been taken in by. Here, you want some "allegory?" Here's an "allegory" for you, some reading of the OT Scriptures with Christ at the center. When I show you this, it should blow your mind. Then you can compare this reminder of how I handle the sacred text with the best those jokers have to offer."
And this is what leads into his typological treatment of Sarah and Hagar, the two children, the two mountains, having a Christocentric focus to his explanation. But see, it isn't just Moses' text, or just Paul and his treatment of Moses. He inculpates Isaiah as well (v27, see Is.54) in his interpretation! As if to say, "Now then, before you accuse me of being no better than these Judaizing Scripture-twisters, and coming up with my own self-interested, self-originating interpretation, please note: Isaiah already gave much the same interpretation!"
So, here's Paul bringing an original author to bear as a witness to Christ, a prophetic interpreter of Moses as corrobration, and the apostolic testimony as the cherry on top of all that (see 2Pet.1:19).