Dark patterns are illegal because they are deceptive user interface designs intended to manipulate or deceive users into taking actions they would not otherwise take. They are a violation of consumer protection laws that prohibit unfair and deceptive business practices.