From what I understand, CBP receives and has access to everything in your PNR.
I would suspect your PNR was notated by the airline employees at your origin and this was noticed by the CBP officer.
See if you could get a copy of the PNR and what the airline employees wrote in there. May not be easy to obtain after a flight, but someone who knows more about this could point you in the right direction.