I would hope that they have a pretty strict process for people they hire to root out criminals.
Its legal because Congress passed a bill saying it was legal, I don't get how you don't understand.
The constitution protects you from unreasonable violations of privacy. Checking your luggage for dangerous materials that would potentially kill everyone aboard a plane, as well as creating mass panic and distrust in a form of travel seems pretty reasonable to me.
XI Wiki



