Etymology
Today it means: That goes against a system of laws, such as the laws of nature. Full definition →
From counter- + legal.
Etymology from Wiktionary, CC BY-SA 4.0.