Altitude sounds close to the word "attitude". When someone has a good attitude, it means they have a friendly, cheerful disposition. A pilot is someone that flies aircrafts. Altitude is the height of an object above ground level, or sea level. Having good altitude means being at a good height for flying. This joke is playing on the term "good altitude" because it sounds close to "good attitude". 
To become a pilot requires a good altitude .