Context: How does \Magento\Catalog\Model\Product::getAttributes() work?
\Magento\Catalog\Model\Product::getAttributes()
Details:
\Magento\Eav\Model\Entity\AbstractEntity::loadAllAttributes()
\Magento\Eav\Model\Entity\AbstractEntity::getSortedAttributes()