Barcodes are scanned at STN to comply with the DfT's requirement of a person entering the Restricted Zone (other than staff) to prove they have "intent to travel". I believe the bar code includes date of travel and departure airport to confirm this, as well as flight number and security number to ensure that each barcode is only used once.