I get caught by this almost every time I build it. For how the issue occurs, see here; for why it’s done this way, you’ll have to ask AdaCore.
There’s a similar problem with libadalang-tools.
As it does for other tools, alr asks gprbuild for its version (who should know better?!)