If I told you to think of a movie or TV show where a 20-something was playing a teenaged character, it wouldn't take long for you to think of an example I'm sure. And I know this gets a lot of people angry, namely teenages for their innacurate representation. So if you really want to know why they do this, I'll tell you.
They don't film scenes in order - Due to scheduling, reshoots, and dozens of other reasons, movies and TV shows don't film the scenes in the order we will watch them in; TV shows will even be filming 3 or 4 episodes at the same time. After filming, the film gets edited into the proper order before they are released.
So why does that make it so teenagers can't play teenagers?
Puberty - Yes, even actors and actresses go through puberty. And as we know, our bodies during these years are in a constant state of change. One day our voices drop, the next we're six inches taller.
When you're not filming scenes in order, and your actor's body starts changed because of puberty, you're going to encounter problems. Several films have to refilm scenes, or even write them out completely, because an actor's voice dropped mid-production. That takes time, and more importantly, money, which productions may not have towards the end of filming.
So next time you want to get up-in-arms about movies casting 20somethings to play highschoolers, remember there's is a very logical reason for this.