Immigration and Customs officials are only government employees and some of them love to use whatever authority they have to make life miserable for others. The only reason I can see is that it's because they feel like it (and this by a Canadian citizen who is sometimes given trouble reentering the country by customs - where the secondary inspector clears me in seconds after waiting enough time to see him).
You are right, clearing U.S. I.N.S. is often no fun for a foreigner.