There is a simple reason: Mini cart: get array of last added items. The last item will be pushed at the top.
\Magento\Checkout\CustomerData\Cart::getRecentItems()
foreach (array_reverse($this->getAllQuoteItems()) as $item) {
......
}
We can write a Plugin to re-order the item in Mini cart.
Vendor/MiniCart/frontend/di.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Checkout\CustomerData\Cart">
<plugin name="item_cart_data" type="Vendor\MiniCart\Plugin\CustomerData\Cart"/>
</type>
</config>
app/code/Vendor/MiniCart/Plugin/CustomerData/Cart.php
/**
* @param DataCart $subject
* @param $result
* @return mixed $result
*/
public function afterGetSectionData(DataCart $subject, $result)
{
//Re-order the cart items
$items = array_reverse($result['items']);
$result['items'] = $items;
return $result;
}