The row that equals the public value reveals the toy exponent.
The target appears
The table eventually reaches value 8, exactly the public value.
Read the hit row
The hit is at x=6, so the toy secret exponent is recovered.
Check the equality
Raising 5 to x=6 modulo 23 gives 8.
56mod23=8
Summary
The brute-force table turns the tiny public value back into the secret exponent.
recovered x=6