In the eighteenth century, a British sailor’s sparse diet consisted of a breakfast and lunch of little more than mouldy bread and water.
If he were lucky, the third meal of the day included meat and was served on a square tin platter.
Because of the shape of that platter, they called it their “square” meal, or the only substantial meal of the day.
Three squares now means three good meals a day.