The original purpose of the square holes on cast cash coins was part of the production process.
When you cast a coin, the edge is quite rough - the casting seam is there, and there's also a "sprue" where the coin was attached to the "tree". To make the coins nice and round, they need to be lathed. But rather than lathe each coin one at a time, they would push the rough coins onto a long metal rod with a square cross-section, so they can then lathe a hundred or more coins all at once.
You can sometimes find coins with "star-shaped" holes; this originally happened if a coin fell off the rod during the lathing process, and had to be pushed back onto the rod at a different angle to lock it in place.
https://en.wikipedia.org/wiki/Huachuanqian Later collectors began to appreciate the (relative) rarity of star-shaped hole coins, which then led to such holes being deliberately made in various charms and amulets.
Over time, the round-coin-with-square-hole acquired mystical symbolism (the square hole is "Earth", and the round coin is "Heaven"). But originally, the hole was put there for purely practical reasons. A machine-struck coin, of course, has no practical need or use for such a hole as part of the production process; on the OP coin, the hole is there purely out of tradition - people "expected" their coins to have square holes in them, so square holes had to be put there.
But the holes did indeed serve another important function: tying them together in bundles, to make them easier to count and transport. Under the Imperial system, 1000 coins would be tied together to make a "string", and 1 string was worth 1 tael (an amount of silver worth slightly more than one silver dollar). In the late Imperial period, the silver dollar was adopted as the standard unit of currency instead of the silver tael, and one string of 1000 cash were retariffed to 1 dollar - making the cash worth exactly 1/10th of a cent.
Don't say "infinitely" when you mean "very"; otherwise, you'll have no word left when you want to talk about something really infinite. - C. S. Lewis