I’m genuinely curious, why is there such a substantial mark up on parts at a shop?

Most people know that they can get the exact same part online at various places for less.... yet shops continue to get away with charging more than even the local parts stores charge. Are they charging for delivery?