I boldened the relevant parts of the quotations, so that you don't have to read all of the quotations. I'm untrained at metaphors! How did "drive out" develop the metaphor of "weigh out"?

exact [15]

The adjective exact ‘precise’ and the
verb exact ‘demand with severity’ have
undergone considerable semantic divergence
over the centuries, but they both go back to the
same source, the Latin verb exigere (from which
English also got essay, examine, exigent [15],
and exiguous [17]). This, a compound of the
prefix ex- ‘out’ and agere ‘lead, drive’ (source of
English act and agent), meant originally ‘drive
out’, but in due course it developed the
metaphorical senses ‘demand’ (preserved in the
English verb), ‘weigh accurately’, and ‘bring to
completion or perfection’
. These last two were
taken up adjectivally in the Latin past participle
exactus, from which English gets exact.

examine [14]

Like essay and exact, examine
comes ultimately from Latin exigere, a
compound verb formed from the prefix ex- ‘out’
and agere ‘lead, drive’ (source of English act
and agent). This originally meant literally ‘drive
out’, but a metaphorical sense ‘weigh
accurately’ developed
which was carried over
into a derived noun examen ‘weighing’. This in
turn formed the basis of another derivative, the
verb examinare ‘weigh’, hence ‘weigh up,
ponder, consider, test, examine’. The
abbreviation exam for examination dates from
the late 19th century.

Word Origins (2005 2e) by John Ayto. p 201 Right column.