The magnetic strip varies by state but the PDF417 barcode is supposed to follow DL/ID Card Design Standard (CDS) as defined by the AAMVA.
Unfortunately, there isn't a national system for encoding the data as described in the specification and some states still maintain different fields than others. As a result, it's a real pain to try and use the standard without accounting for each state's unique set of quirks which tend to change from year to year.
I assume they've built a system to handle all of these unique cases and use some type of OCR to verify everything matches up with both the encoded barcode data as well as the Driver's License number which is partially derived from the demographic data. The facial image comparison is nice but it's not the most reliable test (especially when it depends on the phone's camera and a 2cm x 2cm photo.
Combining that process with a background check of some type will guarantee that the person actually exists but the whole system system can still be duped by a good enough fake ID if the data checks out.
Edit: Also, the new (ugly, pastel-ey) NC drivers licenses also appear to have a 1-D barcode on them as well
I haven't seen a new ID, haven't bothered getting a new one since I turned 21 a few years back so I have no idea what the newer ones have or don't have.