The motivation is to offload computations away from runtime when possible. If one has any knowledge about the execution of the code, presumably based on configuration or client code that won’t change, it would be beneficial to evaluate as much as possible during compile time.
Macros allow these evaluations. The result is called “expended code” that will be inlined at the place of the call to the macro after compilation.
I’ve used it for tracing (events going out to datadog):