It was just a judgement call by the Wal-Mart employee.
You got it, and yes the clerk can be held liable by law.
In college I once was that clerk at Wally world behind the sporting goods desk. Man and woman come in and look at shotguns for her to go dove hunting, he helped her and she shouldered a few guns. Decided on an 870, ran 4473 and sold her the gun. Fast forward 2 months, I'm at work get a call from the manager who says come to the office. Go back and plain clothes ATF questioned me to death on the sale. Turns out that guy that was with the woman was a felon and drug dealer. They raided his house and found the shotty, traced it to the woman who was now an ex girl friend and then to the store. I saved her rear end and mine, by telling the truth, that she bought it for her use and he just helped her pick it out as any male would do. ATF sure questioned what had happened, at length.
Not a fun experience. So if you've never sold a firearm and think you know the rules or the law. As in sports, you probably don't know the rules