It's not quite that simple.
While bolts sizes, thread pitch / TPI and length are standardized, the size of the head can vary due to what is spec'd by the engineer or by what a fastener mfg. has in stock or sends to an assembler.
Hardness/grade and finish are also standardized but some bolts come with intergrated washers, are one time use stretch bolts are are even torque dependant with break away bodies so the head size really can vary.
I've disassembled vehicles and machinery where an M6 x 1.00 bolt may vary in head size by 1 or 2mm meaning you may need a 10mm wrench for one and a 12mm wrench for another. There is a bolt head range that each size fastener must fall into but they can and do vary. Both for metric and SAE.
You are right that it is ciomplicated, but not right about some of the details above:
Engineers don't
typically design bolts. In some industries, they are forbidden by law from doing so. We typically call out national stds. And different national or industry standards do differ from each other. Japan's stds differe from Germany's or the US std.
Engineers can design bolts. I have. Bolts are quite complicated to design and resulting bolts can be very expensive to purchase. Head size is based on the head's ability to react the tension in the shank of the bolt. So there is a mathematical relationship between head size and nominal diameter, but hardness/strength are not part of the equation since the head is made from the same material as the shank.
The std for M6 is 10mm. No national std allows 1mm variation. The bolt encountered may have come from a chinese product. The chinese routinely "shop make" hardware.
I looked at all the national stds and I don't recall that any country had tighter tolerances than any other.
23mm is not a std size head. It may be that one company or one industry uses this size to differentiate between a plug (which may require a different removal or treatment) from a structural bolt.