This depends on t he person and the goals.
Yes as you get older, and if you ran seriously when you were young, you will reach a point where its hard to run anywhere close to your pr's.
And you will not be competitive in races anymore (competitive overall) Perhaps not even competitive in your age group.
If you are not close to personal records, and not competitive, you need to find other reasons to race if you still want to race.
Those other reasons can be social, team related, as a goal, travel related or even as a habit. If you can not justify racing don't race.
As far as doing speedwork, I believe everyone should do some faster running no matter what your goals. It feels good, makes the slower running easier and better, helps with form and efficiency, variety, etc. Pickups or slight surges during runs can be labeled as speedwork at some point.
Some people never stop racing and doing speedwork. Others stop at various points.
Seems like the major life points when people usually stop doing these
after high school
after college
after first kid, time consuming job, marriage
after first major injury, especially after 30
after major surgery, cancer