Every day a mail service must sort a flood of messages into Inbox or Junk. The classic way to build this is to write rules by hand. A programmer studies spam and writes tests: if the subject contains "free prize", send it to Junk; if it has a link and comes from an unknown sender, send it to Junk.
This works at first. Each rule is exact, you can read it, and you know why a message was filtered. The program is simply a list of instructions a person wrote, and it does exactly what they said, no more and no less.
💡Good to know
Remember this shape: a person writes the rules, the program applies them.