Hiding meaning a thrashing is a colloquialism dating from the early 19th century. It derives from the mid-18th century verb hide meaning to flay the skin or hide off an animal for tanning purposes. The noun hide meaning a skin or pelt is a lot older and dates from Anglo-Saxon times, c. 900. Thus, to give someone a hiding is to give them a good flaying i.e. to take the skin off them. It is odd that both words, tanning and hiding, came to be used figuratively for a thrashing or beating, as in tanning someone or giving them a good hiding. Tanning used in this sense is a lot older than hiding, the former dating from the late 1600s and the latter, as mentioned, from the early 1800s. See also Tan someone’s hide.