This would come down to IT changing at a much faster pace than medicine as practiced by people. If you get older as a doctor, people still come in with common problems that you can fix and you're very knowledgable by then.
If you work in IT, you would have had to constantly keep learning. If you stagnate, you would be unable to use technology that is relevant any more. In the analogy of the doctor, you would stop being able to service patients because new diseases have come around that you can't treat.
Now the fact that once you get older means you have kids, have commitments, probably get tired and want to rest after you get home from work, it means you have less ability than a keen 25yo able to work long hours.