i have crossed the usa/canada border more times than i can count and the questions verge on crazy to ridiculous at times...but you have to remember that in many instances the officer is attempting to throw you a curve ball and take you off your agenda ( even if that agenda is only shopping ) and also out of your comfort zone ....i guess that gives him then the edge to catch more telling lies etc...
the solution...simply take a chill pill and just comply/answer in a calm,polite way even if you wanna tell him something not so nice

....then crossing is a breeze.
I felt sorry for this guy at first but then he just dug a hole for himself as time went on ..... your never gonna win those situations