You wouldn't expect a supermarket to pay male cashiers more because the men could become miners.
But they might have to pay more for the people who haul heavy boxes around in the back, which might be male-dominated, leading to a pay gap for 'supermarket worker' if not for 'supermarket cashier'.