How is the base router (Magento\Framework\App\Router\Base) implemented?

Magento_Store/etc/frontend/di.xml

Magento\Framework\App\Router\Base::match()

Magento\Framework\App\Router\Base::matchAction()

See also:

The base router (Magento\Framework\App\Router\Base) ordering has been changed from 20 to 30 in Magento 2.2.2 at 2017-10-15.