The generally accepted theory about much of the earthwork attributes its construction to Offa, King of Mercia from 757 to 796. The structure did not represent a mutually agreed boundary between the Mercians and the Kingdom of Powys. It had a ditch on the Welsh (western) side, with the displaced soil piled into a bank on the Mercian (eastern) side. This suggests that Mercians constructed it as a defensive earthwork, or to demonstrate the power and intent of their kingdom.
— Wikipedia: Offa's Dyke
Offa's Dyke runs roughly along the current border between Wales and England. It was designed in the 8th century to prevent Powys from attacking Mercia. The dyke has two sides. The western (Powys) side is a sump, while the eastern (Mercia) side is a hump, as contrasted between a ditch and a bank in the above quotation. To have ditch differ from dike is to have sump differ from hump, while both go hand in hand. Confusing ditch into dike is confusing sump into hump, so confusingly hence so implausibly, collapsing the sine wave! It sounds wise to have Deich differ from Teich. So it does to have dike differ from ditch.