In part III Rambam's Guide of the perplexed, he categorizes the mitzvot into fourteen classes by their causes, intents and usefulness. He even classifies laws that he acknowledges are choks, which, like all commandments, have a cause, intent, or usefulness,
but it has been concealed and is therefore unknown to us. In chapter XLIX, he says that "most of the chukim, the reason of which is unknown to us, serve as a fence against idolatry."
He proves this using The Nabatean Agriculture, an ancient book from the idolatrous Sabean civilization that Avraham was raised in. He also differentiates between the general and specifics of commandments and shows that many of the seemingly arbitrary specifics of mitzvas are actually rooted in Nabatean idolatrous practices (which were agriculturally driven). For instance, a general mitzvah is to bring sacrifices, but why specifically oxen, sheep and goats? Because the Nabateans worshiped oxen as gods and goats as daemons, and prohibited slaying them. Likewise, the Egyptians worshiped Aries and prohibited killing sheep.
In chapter XXXV he includes wool and linen in the second class, that "comprises the precepts which are connected with the prohibition of idolatry". The reason he gives for these prohibitions "is to establish certain true principles" (that the scripture demands) "and to perpetuate them among the people".
To prove this, in chapter XXXVII, he says it's written in their books that the Nabatean priests wore garments made of plant and animal while holding a seal of mineral (some sort of idolatry while wearing wool and linen), and since we reject all idolatrous practices, it's prohibited.