A drug dog checkpoint on I-80? Wheres the legality?

Way back when I was growing up in Carlsbad, I had many adventures at this checkpoint. Later on while stationed at Camp Pendleton, I found out that hundreds of people per day walked through the installation in an attempt to bypass that checkpoint. The traffic through there is amazing.