Diversity programs are a double edged sword, there are groups that are under represented. However every time you target them you lose the larger group that you didn't target, and that group has great people.
https://www.citizensadvice.org.uk/law-and-courts/discriminat... , https://www.ageuk.org.uk/information-advice/work-learning/di...
Shouldn't it be?
I can also see legitimate situations where you would not want to put adds in front of people who you have no intention of offering a position to. For instance, if you need to fill a Senior position, why show it to a fresh graduate or an internsip/co-op to someone with 10 years experience. again, I have mixed feelings but I can see why a company would want to do it
I agree with your sentiment that no age discrimination is btter unless that is somehow relevant to the job.