I have a Green Card and I get my photo taken each time I enter the country. I assume the same process exists for non-citizens, and that CPB is using these photos for this process.
Everyone on an ESTA has their photo taken when they enter the US (at least first time you enter on an ESTA. I don't always have it taken on subsequent visits). I would assume that is enough for them to match you.