Is the same true of a bus driver, train conductor, taxi driver, etc?
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.