There is usually confusion between
acrophobia, popularly defined as fear of heights and
bathophobia which is the fear of depth. What most people call acrophobia is actually a fear of falling from a height, not of simply being at a height. This is more closely aligned to bathophobia since it is the
depth (height) of the fall which scares the **** out of sufferers.
As others say, if you step back from the edge or don't look down then the fear subsides; so it isn't the mere fact of being elevated, it's the possibility of a PLUNGE (ta-da !

) from that elevation.
I doubt a true acrophobe could be a pilot, but no problem for a bathophobe - just don't try any wingwalking.
Personal aside: my worst nightmares usually involve being stuck on a narrow ledge/flagpole/scaffold. Mrs Tiger usually wakes me with a judicious elbow as I grab her in a death grip