History, geography, and one angry ferry.
The term comes from the Derby area of England, where local matches drew the whole town. Individual derby nicknames almost always encode a local dispute — a river, a railway, a factory or a religious split — which is why they make no sense to outsiders.