I definitely noticed customs people being unnecessarily rude after 9-11. And it doesn't matter if you look like you're of middle-eastern descent, either. My blonde, blue-eyed friend got the third degree coming into the U.S., she's a citizen. They searched her carry-on that had like 3 changes of clothes as if she were smuggling crack or pipe bombs or something, kept drilling her about what she was doing in the country and wouldn't leave her alone. All the while she was witnessing them similarly harrassing some poor lady in a wheelchair right next to her.
So I agree that sometimes no matter how pleasant and cooperative you are, those customs officials just don't care and will treat you like crap because they know they can get away with it. Sometimes they're just jerks with no accountability. It happens.