You can have a senior programmer in their 30s and a junior programmer in their 50s, if the latter is a career-changer fresh out of a coding bootcamp, or with a couple of MOOCs under their belt. Age is often correlated with seniority, but correlation is not causation...
I understand. But typically some one out of college or took a boot camp even needs that amount of time so many are in their 30s. The 50 year is a rarer case.
The younger ones can overwork themselves, job hop, write bad code. And then an experienced coder can sigh and fix it.