I wonder how/if this relates to the fact that many mental illnesses fully manifest around 25 as well. "Roughly half of all lifetime mental disorders in most studies start by the mid‐teens and three‐fourths by the mid‐20s." - https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1925038/
From personal experience I'd say it can relate to mental illnesses caused by trauma, hostile environments, etc. Getting over trauma and other emotional baggage has resulted in large improvements in sustained focus, lower inhibitions, and general cognitive improvements for me and I'm well past the age of 25.
Gradually worsened up until ~25, though. Vastly improved after a couple of years, and seeing the tail ends ~30