Why is the operation for creating/registering components a run time activity versus a compile time activity?

In JavaScript, creating and entity:

const EventSourcedEntity = require("@lightbend/akkaserverless-javascript-sdk").EventSourcedEntity;

const entity = new EventSourcedEntity(
    ["shoppingcart.proto", "domain.proto"],
        persistenceId: "shopping-cart",
        snapshotEvery: 100

For Java, registering an entity:

      new AkkaServerless()

With both language implementations, the link between the code and the protobuf happens at run time. Therefore any misalignment problems are not found until runtime.

Ideally, this should be done at compile time. Even with JS there are tools that would help to surface issues before running the code.