The phrase 'A lemon' typically describes a second hand vehicle that, once purchased, ends up having plenty of flaws.
Examples in use:
”My brothers' car is a lemon. He spends half of his weekend fixing his car.”
“It’s fine to look for a good deal; just be sure that you don’t end up buying a lemon.”
Why would a juicy lemon relate to flawed merchandise? Because a lemon on its own is just a lump of sourness with a thick skin to boot.