I would think the restriction to being over 45 to be employed would be because of physical fitness issues when at the end of the 20-year career that would put one at 65 years old or much older if hired at 50.
It would be tough doing a foot chase through a neighborhood and having to subdue someone that wants to fight if you could catch them.
Mother nature gifts those younger with more stamina and physical strength.
Not to say there aren't folks at that age that could outperform a 30 year old but they are the rare exception.
It might be surprising to you but many departments in other States have no upper age limit. If you meet the physical fitness standards you have just as good of a chance as anyone else in getting the job. Two examples, San Francisco Police Dept. & Alaska State Troopers.