People in German-speaking countries have been unruly since the 15th century. At this time the word is first attested. It belongs to the stem -span, which appears in many word combinations. For example, with the verb “tension”. But also with expressions like “tension” or “wood chip”.
Like “abspenstig,” “Widerstig” goes back to the early New High German term “abspannen,” which meant something like “to lure away.” Someone who is unruly has somehow been lured away - he is not as pious and obedient as the rest.