It's rarer than it used to be, but does still happen.
Sometimes a barcode won't scan, in which case the gate agent usually just manually keys in the seat number from the boarding pass. They should also check the flight number or destination, but sometimes don't...