Stoic...Mambo
As a frequent traveller,mostly to U.S on Business trips, I am also faced with the same predicament more so in personal trips. In some cases the oficers (aMERICANS) intentionally try to provoke a reaction so they can impose there authority on you.
How to react? I stay calm, be polite and answer all there ****** questions. I cant afford to be banned from travel to U.S. and this I believe is there intention.
Like Lazie said whenever i travell for business I get my firm to write an official letter indicating my trip is strictly business. I book my hotel in advance and have all the info ready in writing.
In your case, I think you were too passive. You were not travelling for one and I assume you are not guilty of anything, atleast you should have eddemand to know who he is..
But if you are travelling and you are a Guy....they will try to provoke a reaction and if you want to continue your Trip, just be polite and answer the damn question.