The presiding government agencies have the legal right and authority to open, inspect, and search your luggage. Do they have the duty to inform you? I don’t know. In the US, my checked in luggage has been searched. Sometimes they leave a note. Sometimes they do not.
In the case of a non-government agency like an airport or airline, in the US, the following regulations apply:
From Title 14 of the Code of Federal Regulations:
1544.203 Acceptance and screening of checked baggage.
(a) Preventing or deterring the carriage of any explosive or incendiary. Each aircraft operator must use the procedures, facilities, and equipment described in its security program to prevent or deter the carriage of any unauthorized explosive or incendiary onboard aircraft in checked baggage.
(b) Acceptance. Each aircraft operator must ensure that checked baggage carried in the aircraft is received by its authorized aircraft operator representative.
(c) Screening of checked baggage. Except as provided in its security program, each aircraft operator must ensure that all checked baggage is inspected for explosives and incendiaries before loading it on its aircraft, in accordance with §1544.207.
&
1544.207 Screening of individuals and property.
(a) Applicability of this section. This section applies to the inspection of individuals, accessible property, checked baggage, and cargo as required under this part.
(b) Locations within the United States at which TSA conducts screening. Each aircraft operator must ensure that the individuals or property have been inspected by TSA before boarding or loading on its aircraft. This paragraph applies when TSA is conducting screening using TSA employees or when using companies under contract with TSA.
(c) Aircraft operator conducting screening. Each aircraft operator must use the measures in its security program and in subpart E of this part to inspect the individual or property. This paragraph does not apply at locations identified in paragraphs (b) and (d) of this section.
(d) Locations outside the United States at which the foreign government conducts screening. Each aircraft operator must ensure that all individuals and property have been inspected by the foreign government. This paragraph applies when the host government is conducting screening using government employees or when using companies under contract with the government.
My checked luggage has been searched traveling from Hong Kong to the Philippines. It has also been searched traveling domestically between cities in South Africa. Neither time was I notified nor a note left. Since nothing of value was taken, I can only surmise that it was done by government security. The only way I knew was that the lock (non-TSA compliant) was damaged in China. And, in South Africa, a 20,000 mA rechargeable battery and a book were removed.
The South African incident was very shortly after the ban on lithium batteries in checked luggage went into affect. I had placed the battery in my carry-on. At the last minute, we were told that there was not enough room on the flight for all carry-on bags. Ours would have to be checked. I did not even think about the battery. Upon arrival to our destination, the battery and the book (which was in the same pocket of my luggage)were gone. Nothing else was touched. And, no notification given.