They are just sizing you up. If you fumble the answer or give some occupation that doesn't typically have the income to support recreational travel and you give no other plausible business or familial reason to have made the trip, perhaps they want to dig a little deeper into why you are there. But they 'probably' aren't fact checking it against something in their computer right at that moment.
I had a US Customs Agent ask me to give him a business card once at LAX after answering that question during a secondary inspection. I declined to and told him I didn't see what he needed one for so he gave up that line of questioning and let me go.