late O.E., from any + thing. But O.E. ænig þinga apparently meant "somehow, anyhow" (glossing L. quoquo modo). Anythingarian (c.1704, originally dismissive) was a word for "one indifferent to religious creeds" (on model of trinitarian, unitarian, etc.).
Everything is permitted, as in You're wearing sneakers to the office?—Why not? Anything goes these days. This idiom began life as
everything goes, which appeared in George Meredith's novel The Egoist (1879). In America anything was the preferred word, which gained further currency with Cole Porter's use of the term as the title of his 1934 song and musical comedy, Anything Goes!