That's actually not the case. There's a serial number that the client provides when they want to set the selection (that is, cut/copy)[0][1], but nothing when a client requests a paste[2][3].
I always thought this is weird; while yes, it's nice to prevent random applications from spuriously taking over as the source of the clipboard/primary, I think it's much more important to have a mechanism to reduce the risk of a client pasting without permission.
[0] https://wayland.app/protocols/wayland#wl_data_device:request... (regular clipboard)
[1] https://wayland.app/protocols/primary-selection-unstable-v1#... (primary selection)
[2] https://wayland.app/protocols/wayland#wl_data_offer:request:... (regular clipboard)
[3] https://wayland.app/protocols/primary-selection-unstable-v1#... (primary selection)