"Tengo que estar en el aeropuerto a las dos."
Translation:I have to be at the airport at two.
"I have to be at the airport by 2:00" means the same thing and feels slightly more natural because the airport is a place where you can and should arrive early.
It can be argued otherwise. By two o'clock indicates this hour being an upper limit. Any time, and up until this time, is fine. At two o'clock means simply two o'clock, and not another time.
By relating to time limits in Spanish seems to be marked with ante de or para.
Sure. but that's my point. The context is the airport, not an interview or a date. So, you should be there by that time.
Mm, I see what you're saying. Duolingo tends to not play with context in that way. I'm not sure I remember even being taught the by... construction in the course when I completed it. Just direct times.
A more literal translation would be "in the airport" but I understand a native speaker might say this instead of "...al aeropuerto...." If you were going to the bus station, would you say, "...en la estacion de autobus...." ?