Not only that, developing software is generally a "slow" task, not constant decision making in spans of milliseconds like in a "fast" sport you mentioned. If you want to compare, try a "slow" sport like golf, does your observation still hold true?
In engineering tasks you also gain a lot of productivity (at least if your metrics aren't crap, might be often a problem here) from years and decades of building up experience and knowledge. Moreover this doesn't get lost to a huge degree if you pause 1-2 years, not like physical training which goes away quickly and is hard to build up again.
I think what could play a role here is that older people may often be less focused on the job because that focus shifts to other things in life like e.g. family.
FWIW I'm not talking out of my hat here, I "played" a very thought intensive sport in my younger day and was one of the top guys in the US on any given day. I still have ridiculously quick decision times and the concentration of a Monk with ADD when I drive, But there's no way my bod could compete with a my former self of 20 years ago. I'm in pretty good shape now but I'm not a World class athlete anymore.