It's a relic from the age of sail. Example from a few minutes googling: https://tegfan.net/2014/09/05/the-windrush/

Trafalgar (1805) https://web.archive.org/web/20060919112358/http://www.nelson...

In one of the Aubrey&Maturin books, in order to encourage their sailors to ask the local women to dance, Aubrey decorates a ballroom with a hoist equivalent to: http://www.wightmistress.com/wightmistress.com/IHYC_Flag_Eti... , engage the enemy more closely