Have made over 500 trips to the U.S. since the early 1970's. Been there for sports, vacations, business and just some local shopping . Back in the late 1990's I started to notice that if you had brown skin you got redirected at the Peace Bridge in Buffalo, New York. If the women worn a head scarf or dressed in a manner to suggest they were from a South Ssian country, the whole family got hauled in.
Crossing over at the Detroit border, I can't tell you the number of times young black men were ordered out of their cars and spread eagled over the hoods of their cars and frisked. 
Look, I'm not a fan of this behaviour but, it is their country and if they ask for your phone and you don't hand it over then you won't gain entry. 
Answer their questions, don't offer any extra information and make certain every one has their passport. Plus, have an itinerary or show your hotel reservations. Ans finally don't lie. Ever. Like Trump.