The requirement for the Yiisoft\Router\Route::prependMiddleware method needs to be explained

The Yiisoft\Router\Route::prependMiddleware() method has a requirement that the prependMiddleware() method cannot be used before the action().
Here is an example of using the prependMiddleware() method:

Route::get('/info')
    ->action([SiteController::class, 'info'])
    ->name('site/info')
    ->prependMiddleware(MyMiddleware::class)

However, despite this requirement, the middleware is executed before the action.
I wonder, then, why prependMiddleware() method contains this requirement?