Just as Unity has a legal ability to charge a fee for a game engine, Apple has a legal ability to charge for the Swift programming language along with the rest of the SDK.
It sucks because Apple is hiding behind intellectual property rights to protect its ability to tax the app economy.
Disney could allows 3rd party cafes in Disneyland, mandate the use of Disney logos on all products, and charge a $2 royalty of every product sold with a Disney logo.
It's a dick move but shifts the legal argument from one of monopoly / gatekeeper status to one of intellectual property rights, the latter being much more business friendly and entrenched in international agreements.
It sucks because Apple is hiding behind intellectual property rights to protect its ability to tax the app economy.