In my experience of entering around 10x so far using either F-1 or H-1B visas, the first nine or so times the POE officers have been very friendly and professional, only on my most recent entry, I've had one who was not friendly. He said "he didn't believe in the entire H-1B system anymore" and went completely ballistic after I answered him what my job is. (It turned out I entered in a city where there are massive layoffs for people in my profession - doh!

) Essentially, he suggested I shouldn't be allowed into this country because there's already too many jobless Americans in my profession who should be able to get a job first.
I understand your reaction, I was a little stunned too for a couple of days by the unfriendly welcome. Now I came to understand that whatever he said really didn't matter, what mattered is that he stamped my I-94 and let me into the country, so his words were just personal opinion. Maybe he had a bad day, maybe he's watching the coverage and debate about the broken immigration system and got sick of all immigrants. As Triple Citizen said, they are just human, too.