99% of the time they don't even inquire whose car it is... they just ask about the people in the car, and maybe ask them to show ID and proof of citizenship.
Now, in the unlikely event they do ask, sharing a last name is immaterial. So is being married to the owner of the car. There's no law that says you can't take a car you don't own over the border. You'll just need the registration paper, no matter whose name it is in. That's like the CAR'S identification documents. The only reason they would ever inquire, I think, is if they suspect you're planning to sell the car across the border....or maybe if you and your car fit the description of someone they're looking for.