I cant fault the guy. I do the exact same thing on occasion when the lines are long. It is not my worry, or care, that the store receive credit from the vendor. If I see a long line, I'm self exchanging and walking out as well. The item IS paid for. You already paid cash for a working item. The fact that its missing pieces, or defective, is the stores problem, not mine.
Just last week I bought 4 PVC pipes that were supposed to be 8 feet long. I get out to the truck, and notice that one pipe is about 6 inches shorter than the rest. Someone cut off a 6 inch section of pipe, and put it back on the rack. W T F? I walked right back in, saw the huge line at returns, put the short pipe back on the rack, and walked out with MY merchandise, that I already paid for. A store clerk or manager can get bent out of shape if they want, but its MY merchandise, that I have already paid for. Time is money, and the store is not compensating me for my 15 minutes of time to stand in line so that their computer inventory is accurate. That's not my problem.
As to receipt checkers at door, I routinely walk right past them as well (with a smile, have a nice day). If money has exchanged hands, the item belongs to me. You can request a receipt, but I can respectfully decline to prove that I own said item. Someone walking out the door with merchandise is not probable cause to detain them.