Fifteen minutes for 5 km is still not fast no matter how many local races someone wins with that time. But if your criteria for racing is having a chance to win a race that you've entered, the answer is to find one slow enough for that to be possible. I've seen 5 kms won in over 20 minutes. You're saying that someone who can run 17:30, say, for 5 km should race if he lives in places where that time might win a race and not race in places where it won't win a race.
But if everyone who has no real chance of winning that race adopts your philiosphy perhaps no one would show up at races. Go to any road race and analyze the field. If a hundred people are entered there are probably fewer than five of each gender who have a realistic chance of winning. Realistically no one is going to put on a race for ten people.
Some people want to see what they're capable of doing when they make an all out effort to run a distance as fast as they can and find that competition stimulates them to push harder than they could do otherwise. Some just enjoy the feel of being part of a somewhat big event.
But that doesn't really matter. If you think there's no point to racing if you have no chance of winning then you shouldn't race. Why would you care what others do? My wife belongs to a tennis club. There are all sorts of competitions that are arranged by that club. Most of the people who play in them will never win one or really get close to doing so. But they ENJOY it anyway.
If you're asking people to explain why they enjoy something that you don't in hopes that you'll be able to understand it you're going to be disappointed. I can't understand why anyone likes golf or watching NASCAR. I've tried to understand for decades but I don't. So what?
If you're reached a point where your performances have deteriorated and therefore racing is no longer enjoyable then you should stop. And you should resign yourself to the fact that you may never be able to understand people in your situation who don't stop. If you keep this thread going until you get an answer that satisfies you it's going to be a very long thread.