This case hinges on three facts. First, displaying housing ads that exclude protected classes is illegal. Second is that Facebook built tools that allowed advertisers to create said illegal ads. Finally, Facebook had no oversight process to reject potentially illegal ads. The fact that Facebook created tools that allowed advertisers to effectively cause Facebook to break the law in an automated fashion isn't really much of a defense.