I'm not sure I agree that it's Facebook's fault that people use its platform to target ads illegally, but clearly you shouldn't be targeting job ads to people by age.
It seems reasonable to me that an automated ad platform should take steps to prevent users from running illegal ads. It seems like it would be fairly easy, at least for discriminatory ad types: just look at the law and gray out selectors for protected classes when an ad for employment, housing, etc. For instance, if you run an employment ad, age, race, and gender demographic selectors should be disabled.