It is in the Federal Air Regulations (FARs), so no direct transfer to other industries.
Never been around ocean going ships, but I believe a ship captain can do the same thing, and even put a passenger off at the next port if he decides to.
On an aircraft, the Captain is the ultimate authority, and the flight crew enjoys a protected status as far as attacks on their person by a passenger, it is a violation of federal law (and the FARs), and will result in arrest. Further, fines can be levied by the FAA against passengers without any right to a hearing or trial. The fines start at $10,000, IIRC.
As I understand it, a ship’s captain, at sea, can put you in the brig, in shackles or under house arrest, so to speak. Their word is law.
Alrighty then! So if my daughter is denied her flight because the pilot doesn’t like her Star of David (or her Tea Party t-shirt) or my son is denied because he’s a diabetic or my husband is wearing a military t-shirt that the pilot finds offensive, I’ll be sure to keep my mouth shut.
After all, the pilot can do any damn thing he wants. I keep forgetting that those pesky laws against discrimination only apply to Muslims.