One of the mysteries of the English language finally explained.
Definition of hat money in English:
hat money
noun
rare, historicalOriginally: a payment made by a shipper of goods to the captain of a merchant vessel for loading and taking care of the cargo. In later use also: a percentage added to a freight charge to cover the cost of loading and unloading.
Origin
Late 17th century. From hat + money, partly after the corresponding use of French chapeau chapeau (although this is apparently first attested later than in English: 1723 or earlier), and partly after the corresponding use of Spanish sombrero sombrero.