rest_api_init is run on every rest call to endpoint

This is the expected behaviour. When you register routes with the REST API you’re registering them for the current request. This is the standard pattern for WordPress. It’s the same behaviour with register_post_type(), register_taxonomy(), register_setting(), register_nav_menu(), register_widget() and so on. Actions and filters registered with add_action() and add_filter() are also registered — and fire — … Read more