Fundamentally, the issue is that the smog test consists of three parts: a visual inspection, a functional inspection, and a tailpipe emissions test. You can fail the smog test if the inspection determines there is something wrong, even if the emissions test finds that all emissions are within limits.
Here is the relevant quote, from the state’s website:
Q: What are the elements of a Smog Check?
A: In order for your vehicle to receive a Smog Check certificate, it must pass all the following elements of a Smog Check inspection:
•A visual inspection, in which required emissions control components and systems are identified, and must appear connected and functional.
•A functional inspection which includes, as applicable, checking the functionality and/or integrity of the emissions control malfunction indicator light (“Check Engine”, etc), the ignition timing, the gas cap, and the Exhaust Gas Recirculation (EGR) system, if the vehicle is so equipped and a Two-Speed Idle (TSI) test is being performed. A Low Pressure Fuel Evaporative Test (LPFET) is performed on all 1995 and older vehicles. A functional check of a vehicle’s On-Board Diagnostic (OBD) system is also performed on 1996 and newer vehicles. Diagnostic information stored in the vehicle’s computer is reported on the Vehicle Inspection Report (VIR) that the motorist receives at the end of the Smog Check inspection. OBD information can save time and money when repairs are required.
•A tailpipe emissions test, which measures exhaust emissions using a probe inserted into the vehicle’s tailpipe during testing. Vehicles pass or fail this part of the Smog Check inspection based on established emission standards, sometimes called cutpoints.
Cite:
http://www.autorepair.ca.gov/80_BARResources/02_SmogCheck/Frequently_asked_Questions_Part_2.html