While the airlines avoid opening items, airport security, TSA in the US for example, absolutely can open and search any of your belongs at any time without informing you in advance. TSA, for example, is supposed to place a Notice of Inspection in the bag if it has been inspected.