Earlier quoted context omitted.
So it seems, that those movies are mainly targeted at older mens fantasy and do not represent reality. Quelle surprise.
There is a simpler explanation. Those older men are known actors/stars who have established some influence in the industry. That or some people might buy tickets to watch movies because it has a familiar name in leading role. The combination of the two above might be enough to explain why the older men can still play lead roles in movies.
Because men can have attractive roles past 40 and women not, or only very rarely. I don't remember the name of the movie, but it was about greek and a female character that was 40, but the cast was not offered to a 40 year old, but a 30 year old.
Because 40 year old women are not supposed to look like 40 year olds, which is where we are back to the fantasy thing.
Biology is a real thing, though, men can become fathers with over 50, but women cannot. So I am not judging btw. But those fantasies are real and strong, even though they are taboo nowdays.