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"],
    "example.shoppingcart.ShoppingCartService",
    {
        persistenceId: "shopping-cart",
        snapshotEvery: 100
    }
);

For Java, registering an entity:

      new AkkaServerless()
          .registerEventSourcedEntity(
              ShoppingCartEntity.class,
              ShoppingCartApi.getDescriptor().findServiceByName("ShoppingCartService"),
              ShoppingCartDomain.getDescriptor())

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.