The aircraft is operated by an airline to provide a public service for all who can afford to buy a ticket. This is in contrast to a privately owned aircraft where the owner can say who comes on board.
That might be the nub of the issue. In fact, in most cases aircraft are privately owned and the owner can indeed say who comes on board (as long as they are not violating the discrimination laws in their country.) I live on an island served by a ferry and one of the harshest punishments you can get is to be banned by the ferry system; if you board, the police will remove you for trespassing. Works like a treat sometimes...