Why wasn't my passport stamped at the US border?

//ads -- adsterra.com -- native banner
?>
My friend and I (both visa nationals) were traveling from Canada to the US by bus last weekend. To my surprise, the immigration officer didn't stamp either of our passports and instead simply waved us through after scanning our documents. The entry was properly recorded, but I can't help but wonder if we didn't break some law by entering the country without a passport stamp.
What's the reason behind the lack of a stamp? Isn't it mandatory for non-Canadian visitors?
Pictures about "Why wasn't my passport stamped at the US border?"



It Wasn't Me
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Ekaterina Belinskaya, Javon Swaby, Liza Summer, Budgeron Bach