You can't really pin the issue on instructors or the consumer. The fact of the matter is that both are to blame.
Yes many people stroll into dojos/dojangs/whatever with vast misconceptions about martial arts and what they entail. There are those who think that after three months they'll be the next Bruce Lee ultimate street fighter. But on the polar opposite, there are those who are walking through the doors not caring one bit about the martial aspect of it and want solely to focus on the art and/or the health aspects of a workout. And as mentioned, there are parents who enroll their children simply because martial arts will serve as a baby-sitting service while mom & dad don't have anywhere else to put them for the time being; sad to say but I've seen it myself.
Now you've poised the question as to where the problem stems from. I don't know if I would really call McDojos a problem per say. Do I like them - not personally. But if someone is getting into martial arts to socialize and workout, then I'd rather have them join a McDojo for two simple reasons. First is that the McDojo might spark their interest to further the study of martial arts and force said person to broaden their horizons and see what else is out there in terms of what falls under the martial arts umbrella. Second, that is one less person I have to worry about taking up my training time in which I could be learning something that I'm interested in. If they're down at Billy Bob's School of Karate and Waffle Fries goofing off and not paying attention, that's one less person to distract me or my sensei while I'm learning (as my sensei would probably point out at this moment, admittedly at times I can be a goof off and distracting but at least I'm funny about it).
So what brought on the the McDojo phenomenon? I believe that the McDojo phenomenon can basically be traced back to a few issues (preemptive note: I am not trying to argue society impacts and impressions, merely giving my two cents on the factors contributing to McDojos):
Technology: This is probably the biggest one simply based on the fact its so encompassing. But the truth is that society, and today's generations, have a much easier life than those who were training only a few decades prior (please note at this juncture that I fall into the "under 30" group so I'm not trying to be mean to all the young whipper-snappers). While technology has certainly opened up a vast number of avenues for the sharing of information, it has made people "softer." For example, I remember as a child watching TV on a set where you had to physically get up and walk across the room to change the channel - nowadays, two decades later, nobody would consider buying a TV unless it comes with a remote. Why? Is it really that much of a strain to get up, walk across the room, and physically press the channel up/down button? No, but we have become so accustomed to the convenience of a remote - the ability to use technology to do less work with a greater reward.
"I want it now!" mentality: This sort of ties in with technology IMO. As a culture, with the vast leaps and bounds we've made in the past few decades, those of us in more advanced civilizations have come to expect things instantly. We no longer want to wait on things when we can have it now. Nor do we really ever question if we
shouldn't have something. As Zach_Zinn mentions earlier, some people are not cut out for martial arts. But why should that stop you from taking a martial art if you have enough money to throw around.
Medals/Tournament Competition: While tournaments and competitions are certainly an acceptable aspect of displaying one's martial art skills, to the uninformed, decisions can be made about the quality of fighting skills being taught simply based off the number of shiny medals and trophies a place has hanging in the front window. It is the whole dangling a carrot at the end of a stick routine.
We've all seen the musical/dance katas

and at one point (if not more than that) thought "There's no way that would ever work in real life" or "I could so take him/her in a fight." Can there be martial artists who are adequately trained in self-defense and like to perform musical katas; sure, I'm not arguing that. But what is going to impress the average Joe more: an empty store window where the students train in blood, sweat, and tears
or the twenty medals and trophies hanging in the store window next door? Often the instructor with the window full of plastic and medals will be viewed as "the better of the two," regardless of what training takes places between the two schools. This will then create a cycle in which the tournament instructor is then given a certain set of expectations by the student so that he or she may someday win medals themselves, thus enabling them to reach that carrot on the end of their stick.
Therefore, the instructor, if he wishes to maintain said student will then have to make sure the training he offers falls within the parameters to fulfill the students wishes. That student then goes and wins a trophy for the school, which gets placed in the window, another average Joe walks by, conjures up ideas and dreams of winning his own trophy, enrolls in the school, and the cycle is repeated.
The Media: We've all seen how unrealistic martial arts is portrayed not only in movies (Bloodsport to name one), but in television (Kung-Fu), news stories (The Human Stun Gun news piece anyone), and so on. I don't think I need to go on with this any more.
Capitalism: Unless you've lived under a rock, by now you're probably realized that in a capitalist society, if there's a product or service out there, someone has thought about how to make money off of it. Take the Pet Rock for example - Gary Dahl made millions of dollars off the idea of putting rocks in a box with air holes and calling it a pet. With the growing popularity of martial arts in the media, it was only inevitable before someone decided to make money off of teaching martial arts. Now granted, there are some legitimate instructors out there who do make a profit and run a quality school and they're is nothing wrong with that. However, when the student base is your only source of income, your primary incentive then becomes sustaining and growing your student count (in order to stay above the red) over teaching what you want.
And finally. . .
Martial Arts Instructors: A tad controversial at first glance I know. But simply put - for every student that has walked through the doors of a dojo, wanted the easy way, and got it; someone had to give it to him or her. If every instructor that was initially approached about a fast track to a black belt and replied with "Sorry, we don't do that here. We value a hard work ethic over X,Y, and Z." then we might have never seen the spawning of McDojos. However, whenever someone voluntarily chooses to run a martial arts school for their primary source of income (see Capitalism above), the instructor has two chooses: 1). Teach how he/she wants and hope the quality is good enough to keep them afloat, or 2). Teach what they think would appeal to a larger market segment, effectively increasing their potential for students and lessening the chances of undergoing financial hardship.
So back to the question at hand - which came first. Hard to tell. Was it the student who wanted the easy fast track to the black belt? Or was it the instructor trying to make a buck and keep his/her school open? Hard to say definitively.