I'll repost a comment I made on the Sci-Fi site as an answer here:
There is actually a certain logic to it. One of the (if not the) primary duties of the Grandmaester is to represent the Maesters on the Small Council, which is the group that actually runs the day-to-day operations of the kingdom. What the Maesters need most out of this position is someone who can get sympathetic ears from the other councilors when an issue important to their order comes before the council.
From this standpoint, far and away the best person for the job is someone who was a fellow traveler with the other councilors in the conflicts they just went through. Best of all would be someone who fought and sweat and bled with them.
In short, this is a highly political position, so the best person for the job isn't necessarily going to be the oldest, wisest Maester. Its going to be the person who can be most effective arguing for their interests. The person who is most trusted by the other councilors.
If you think this is unreasonable historically, well, its just flat out not. For an extreme example, during the darkest of the Middle Ages, there were no less than 3 Popes elected who were in their 20's. Were these young men the best biblical minds that all of western Christendom had to offer? Of course not. However, they were relatives of the local nobles, at a time of very little law, when the Church was completely reliant on those same men for its protection (and sometimes even for food). It was vital for both the Church, and those nobles of course, that the Popes be someone the local nobility could trust.
There is apparently some amount of in-universe precedent for this as well. Pycelle, the old Grandmaester when the books open, was apparently elected at the tender age of 42. I haven't read the books myself, but if that link is to be believed, his youth at the time was why he was selected, as the three previous holders hadn't managed to stay alive long enough to build any useful relationships on the council.