I first ran across this scam in about 2002 with SD cards back when digital cameras were much more popular. I recall a vendor "proving" it was legit by plugging it into a computer in front of me and showing the SD card had 1gb of storage.
It attempts to write the full storage and then read it back. If its fake, the read will fail. It's also useful for detecting storage that has become unreliable.
Absolutely, but it may take multiple minutes or hours to detect; which you do have when you buy it off Amazon but not when you've bought it off a sketchy vendor at a flea market.
I'm sure the scam is even older than that.