The UDP length field counts the header and the tiny payload together.
Length covers header and payload
The UDP length field counts the UDP header plus the UDP payload. Here the header is 8 bytes and the payload is 2 bytes.
Tiny payload
The payload bytes are 0x6869. They are the two ASCII bytes for hi.
payload bytes=2
Length field
The length field is 10, matching header plus payload.
UDP length=10
Summary
The receiver does not guess where this UDP datagram ends. The length field is checked against the exact header and payload byte count.
length=10