We might expect ‘as thick as thieves’ to be a variant of the other commonly used ‘thick’ simile ‘as thick as two short planks’. The fact that the former expression originated as ‘as thick as two thieves’ gives more weight to that expectation.
As you may have guessed from that lead in, the two phrases are entirely unconnected. The short planks are thick in the ‘stupid’ sense of the word, whereas thieves aren’t especially stupid but are conspiratorial and that’s the meaning of ‘ thick’ in ‘as thick as thieves’.
‘Thick’ was first used to mean ‘closely allied with’ in the 18th century, as in this example from Richard Twining’s memoir Selected Papers of the Twining Family, 1781:
Mr. Pacchicrotti was at Spa. He and I were quite ‘thick.’ We rode together frequently. He drank tea with me.
Like all ‘as X as Y’ similes, ‘as thick as thieves’ depends on Y (thieves) being thought of as archetypally X (thick). The thieves had some competition. Earlier versions were ‘as thick as’… ‘inkle weavers’, ‘peas in a shell’ and ‘three in a bed’, all of which were examples of things that were especially intimate (inkle-weavers sat at looms that were close together).
These variants have now pretty much disappeared, leaving the way clear for ‘as thick as thieves’.
The Graphic Arts Collection recently acquired two copy books by Elizabeth Corbet Yeats (1868-1940), the sister of W.B. Yeats. In the 1890s, Elizabeth was living in London, teaching art to children and involved with the Royal Drawing Society of Great Britain and Ireland. The Society’s director, Thomas Robert Ablett, wrote the introduction to her 1896 edition.