How does Magento 2 pick up the best seller products? What is the logic behind that? (I have the code , but want to know the logic)
Simple logic behind that number of product quantity order most is bestseller product.
You can also see on line 138
'qty_ordered' => new \Zend_Db_Expr('SUM(order_item.qty_ordered)')