It allows to expose variables and functions to be used in the editor. That is, the game creation tool will use a form of reflection (or similar) on the code provided by the developers, which then allows it to expose parts of it in editors for designers.
For example, let us say a developer has created a class of objects (created as source code) to be placed in game by the level designers. However, there are some properties the developer wants to allow the designer to tweak. To do this, the tool will have to expose these properties to the level designer in the editor.
Similarly, functions/methods could be exposed. Which may allow to use them in scripting (including visual scripting, for example “blueprints”) or even allow to call them from an in-game debug console.
Since the editor cannot know the type information before hand (the editor was created before the game). Instead the editor will need a manifest with this information. To get this manifest, the editor (uses a tool that) generates it, either directly from the source (this could be part of the built process) or from a binary. The developer might have to mark what to expose.