Given the requirement to have the items with you when detaxing, they understand this is not feasible on a short layover, when items might be in a checked bag, not to mention the time constraints, so on a single ticket with a short transit, detaxe is done at the originating airport. As an aside, unless it is wine, toiletries or chocolates, I do not recommend putting any item worth detaxing in checked luggage.