There are 3 aspects that make Drupal 8 more robust than WordPress code-wise: selective loading, quality, and caching. Generally the object-oriented code (OOP) is slower than the functional code, and having more code is slower than having less code. Drupal 8 has way more code than WordPress and it's OOP. So why did Drupal 8 beat WordPress by average 20% during my tests? Here's why.
Drupal 8.5 has been released, and it's a beast. But how can such a complex web application be so fast? Autoloading, smart caching, resource optimization.