I have a horrible fear of heights. I can't get close to the edge of a cliff at the beach, I won't go near the floor length windows of skyscrapers, I even chickened out and lost face with my buds on the "Big Shot" atop the Stratosphere in Vegas when I couldn't face getting on and had to climb down the stairs while my buddies went.
But I've been a private pilot (VFR only, not licensed anymore) and done a bunch of skydiving. No problems with that. Not ever.
It is totally different in a way that you can't explain. Above a certain height or enclosed inside a plane it is an abstraction, whereas at the cliff edge or looking down at a street below, the risk is very concrete (pun partially intended).
Hell, I start sweating when I get up on my roof to do maintenance.
A colleague was in 1 Market Plaza in SF during the earthquake of 1989 and the building swayed so much that his chair rolled back from his desk to the window-wall and he was looking straight down over the divider between the first lane of Market Street and the MUNI rails. After hearing his story, I avoided the 1 Market Plaza office and chose a satellite office in a nice three story building instead.