Just like when you're at the grocery store, sometimes some bar codes and QR codes have a difficult time being read by the scanner.
If you're having difficulty scanning a code, hold both your device, and the code being scanned, as still as possible, and allow the camera time to focus.
If you're still unable to scan the code, no problem, just find another!