You'd think that with the relatively smaller populations of the past, they'd want to preserve manpower and not execute people willy-nilly.
Or were these laws, as most today, just an excuse to consolidate wealth and power from the executed "convicts" into the hands of the already wealthy and powerful?
Very trigger-happy laws are often not intended to be implemented exactly as written. If you have done something against a family that the law says you should be executed for, you can probably purchase your life from them. Same goes for all the eye-for-an-eye punishments.
A very different time and place, but in early medieval Iceland if you poked out someone's eye, that someone now owns your corresponding eye. Then you can together come to terms on whether the eye should be also poked or if you can agree on a price to buy it back.
A more statist example, at times in ancient China the law code had execution as punishment on basically every crime that the state got involved in at all. But most of the condemned were not executed, but eventually had their sentence commuted to internal exile (into some other part of China).
I've read that also in medieval Finland crimes that were punishable by death rarely resulted in actual execution. Fines and other less harsh punishments were preferred, probably because that way the criminal could still remain a contributing member of the community. Makes sense considering how small the communities were back then in these parts of the world.
Pre-birth control, there were usually more mouths to feed than food to feed them.
Modern machines and energy allow things to scale and be decoupled from human productivity enough it’s easy to forget - but it used to be, a hand not helping make food and helping it’s neighbors, was a hand hurting them. In real, concrete ways.
Back then, no one had the infrastructure or wealth to deal with putting a bunch of assholes in cages and feeding them regularly until they ‘behaved’. Usually anyway.
Hell, unless the cages were intentionally horrific, that would often be a step up on most folks day to day living conditions anyway.
So make an example, and make it a spectacle - and cheap. Hard to beat an execution on that front!
Those were times where premature deaths were extremely common and natural. This probably manifested a much reduced fear and intolerance of killing, as against today where murder is a very rare phenomenon and results in long-term trauma across all people who were even remotely involved.
Surplus of labour is entirely possible in agrarian society. Later in Europe there were periods when there was more labour than there was land. In situation like that losing some is not as big deal. Also "state" did not invest in their citizenry. So they did not lose anything by losing people.
Or were these laws, as most today, just an excuse to consolidate wealth and power from the executed "convicts" into the hands of the already wealthy and powerful?