The airline "needs" to know who you are because they're trying to maintain their business model - capturing as much ticket value as possible - this would be impossible of airline tickets could be sold on a secondary market. Or they might have an obligation to a destination country to provide a passenger manifest.
Immigration might need a record of who you are because they're presumably trying to enforce immigration controls.
The airport doesn't need to know who you are. They are providing a building with some ancillary services like shopping and dining.
If the airport needs to have a record of you being there. What's next? Does the train to the airport need a record? What about the taxi you took to get to the train station. What about the 3 block walk you took to get to the bus stop?