> when I was a new grad I started on the codebase more or less right away
I did as well, but...
> Didn't even have code reviews back then.
Not so much this one.
> If you have to train them, then it seems the coding part should be cheaper then the algo part.
I do actually agree. But there tends to be other aspects of the job outside of just code and algorithms. Prior work experience is a shining star compared to a 22 year old in any field. I see my coworkers more than my family. Someone that has a full understanding of everything that goes along with that has a head start across the board. Someone changing careers in their late 20's also tends to put a hell of a lot more into improving themselves than just the basic progress-of-life learning. I just think it evens out as long as you're consciously hiring people for the right role.