The gemara quotes a machlokes whether one is allowed to wear shatnez when they are not intending to benefit from it (such as wearing it so that it looks like a personal garment that is not for sale and thereby tax exempt). The gemara says that this is the machlokes that we find all over shas between R' Shimon and R' Yehuda whether a דבר שאינו מתכוין is mutar or assur. The major question is that R' Shimon is only matir a דבר שאינו מתכוין when it is not a p'sik reisha, meaning that the issur may or may not be violated, but in a situation where the issur is definitely being violated, the lack of intent will not permit it. Tosafos (Shabbos 29b) says that it is speaking about a situation that it is not a p'sik reisha because the person is wearing other clothes that protect him, and therefore it is only a safeik whether the shatnez garment will also be providing protection. However, the Ran in chulin (32a b'dapei ha'rif) is mechadesh - דלענין הנאה ודאי אע"ג דהוי פסיק רישיה שריא דהא אמרינן התם מוכרי כסות וכרין כדרכן ובלבד שלא יכוונו בחה מפני החמה ובגשמים מפני הגשמים וכו' דכיון דלא מיכוין לה לא חשבינן לה מידי
The Ran holds that issurei hana'ah are different than other issurim in that pleasure can only be appreciated and qualified as a benefit when there is intent. In the absence of intent, it doesn't qualify as hana'ah. That is why R' shimon is matir by issurei hana'ah even when it is a p'sik reisha.
The Ran in Shabbos (41a b'dapei harif) explains the rationale to be matir even when there is an inevitable benefit somewhat differently - לפי שלא אסרה תורה אלא מלבוש שסתמו להנאה אבל כל שאין לו הנאה ממנו אינו מלבוש אלא משוי בעלמא
Here the Ran limits his chiddush specifically to the issur of shatnez. Although other forms of issur hana'ah may very well include acts of hana'ah even when there is no intent, the issur of shatnez is different. The very nature of the issur is to assur the "wearing" of shatnez which by definition requires intent to benefit from the clothes.
The difficulty with the approach of the Ran is that the chiddush is really a chiddush in the specific issur of shatnez (Ran in Shabbos) or the concept of "hana'ah" (Ran in chulin), but has nothing to do with the general rule of דבר שאינו מתכוין being mutar or assur. Meaning, even if דבר שאינו מתכוין is normally assur, one can still hold that hana'ah requires intent, or the issur shatnez requires intent. So, why does the gemara always connect this to the very global machlokes of R' Yehuda and R' Shimon about דבר שאינו מתכוין?