There was no reason to limit Jews to ghettos in the Middle Ages except to cause harm (in sense 2).
The medieval allegations against Jews were so persistent and so profoundly nasty that they constitute a genre of their own; we still use the phrase "blood libel". It seems plausible that some of the people responsible for the ghetto laws believed them.
They were entirely wrong, of course, but by the same token it may well turn out that Chesterton's fence was put there to keep out chupacabras. That still counts as knowing the reason for it.
That falls under case 1. It is always possible to answer (given sufficient knowledge) "why did X do Y". Y can then be called a reason, so in a trivial sense, every action is done for a reason.
Normally, "did they do it for a reason" means asking if they did it for a reason that is not just based on hatred or cognitive bias. Were blacks forced to use segregated drinking fountains for a "reason" within the meaning of Chesterton's fence?
Another month, another rationality quotes thread. The rules are: