It probably has something to do with the freshness of homemade plus less preservatives... Just an uneducated guess though... What I know for sure is you're right!!!
Almost anything that is homemade is better than something that is mass produced. Maybe it is the preservatives and chemicals necessary to maintain freshness in store bought cookies, or maybe it's the love put into the cookie that makes it taste better. Either way there is nothing like biting into a warm, homemade, oatmeal, raisin cookie.