The river is actually the reason why
First, the river moves Northward from its start point to this place here in Hancock where it reaches its northernmost point. Some say that the northward moving portion of the river was unknown as the charter was laid out and that the state was never supposed to be this shape. I’m not sure of that, but I’ll welcome some input from others who might know.
Second, this stretch of land was never intended to be only 1.7 miles as the original charter for Maryland extended it up to the 40th parallel, which (and I am being very approximate here) would extend the northern boundary into PA at around the point where I-70 intersects with I-76. More boundary disputes here.
In either case, this picture looks out over the northern most southern boundary of the state of

