When Bill Finger co-created Batman with Bob Kane, he decided to name Gotham City after the real city of Gotham, Nottinghamshire, England. He wanted Gotham to be a place where the criminally insane lived, and the English town provided the perfect example of just such a place.
The rumor goes that a King John was building a Royal Highway in the 13th century, and had plans for it to run through Gotham. The citizens of the town knew that they would be responsible for maintaining the road after its construction, and were not willing to do so. In an effort to dissuade the king, the whole town feigned madness. The king’s knights observed them in irrational behavior, such as keeping a cuckoo captive by putting a fence around the tree it was in. The ploy worked, and the king rerouted his highway away from the town.