Having talked with over 200 of them, I'd suggest that just like people in most career training programs, there's something about the job (as they imagine it) that attracts them relative to other jobs. "Huh, that looks like a good job, and I suspect I can do it, maybe I should invest some time and money into finding out!"
I don't think anyone thinks it's a get-rich-quick plan; no one expects it to be easy. And if they do think that, they revise their estimates on the first day of bootcamp. But many of them DO suspect that as a career, coding pays well relative to the amount of work it is, and has good growth prospects. I too believe that, so I'm sympathetic to their perspective, although I doubt it's the BEST career in those aspects (I hear trades are really quite lucrative). The degree of "passion" for various particular aspects of the career is variable (e.g. desire to do the act of coding, e.g. desire to produce software, e.g. desire to work in startups, e.g. desire to make mad bank, e.g. desire to have flexible working conditions, e.g. desire to get paid to do math). Few of them have had wildly successful careers in other domains (I believe that between 1% and 3% of my sample were already making six figures in another career), so the majority are hoping that this will be their successful career.
In summary, it is true that all of them expect that learning to code might be somewhat economically productive, but your phrasing is condescending and nasty. Don't be nasty.
Disclaimer: I have a vested interest in bootcamps being at least somewhat successful.
But I don't think coding boot camps are evidence for great love for coding for its own sake. People who really want to code will find some way to do it no matter what. They don't need paid tuition.
It's the certificate and contacts they're after (and pay dearly for).
If you were unfortunate enough to attend a school that didn't have any sort of computing classes, after school groups, etc, or you lived somewhere rural that didn't have those programmes outside of school then you would have had no access to a mentor who can guide you.
If they have 3 months to go to a camp, surely they could as well learn at home for those 3 months.
In order to learn on your own you need some knowledge to start with. If you sit down in front of a computer with zero knowledge of a subject then you don't even know what to put in to Google, and if you start with a search like "how to code" you have no way to assess whether the websites you find are actually useful or a waste of time.
Languages like Scratch can teach someone to code when they have no external input. They might teach "bad" ideas, but those can be unlearned and replaced with better concepts later. Most of us learned by starting with something like BASIC and have gone on to learn better techniques. There's no reason why someone learning today has to start with a "good" language like Python.
Heck, I started with Visual Basic 6. That's was far worse than Scratch as far as teaching bad practices go.
I grew up in a small Greek village at a time when very few people knew what a computer was. My first exposure to programming was finding a CD with all sorts of things in it, including Visual Basic 4. I had no internet, so literally the only thing I had to go on was the VB language reference (the reference, as in, this function does that), and a two-page tutorial on making a temperature converter.
I taught myself programming using just that reference and tutorial, and nothing else. I don't believe courses are necessary if you want to learn programming.
You're wrong. There are lots of developers who are self-taught, and just like you they didn't need a course. That's awesome. Similarly though there are lots of other developers who aren't self-taught, and for whom the process of how to think about code didn't "click" with them until they were taught the basics. Those developers needed a course.
People aren't all the same, so what works for one person won't necessarily work for another, and given the number of developers society will need in the future we will have to afford opportunities to every type of learner.
It really is 1999 all over again. :-( :-)
I would be very surprised if you honestly can't conceive of people who would struggle immensely to teach themselves the way you did. Or even if they could succeed in doing so, that it might take too long or be too financially risky.
I personally know plenty of people like that. Some of them are very intelligent as well.
The opportunity of access to extensive mentorship and a solid curriculum. Those things make a good boot camp a more efficient way to learn than doing it entirely on your own, not least because you don't have to discover all the blind alleys and mistakes for yourself. (Like I did! But I started at age six. An adult looking to learn a trade skill has not the luxury of a whole lifetime to spend doing so.)
The booming industry of coding boot camps shows that there are a large number of people who want to code but didn't have the opportunity or knowledge to learn until they were old enough and wealthy enough to pay for private tuition. I would argue that is strong evidence that your assertion is wrong - it's a reasonable assumption there are a number of people who are capable of coding and who want to code but can't afford private lessons and therefore won't ever become a coder.
Lowering the barrier to starting, to the point where it's as simple as running an app without any cost (beyond access to a computer), is a very good thing that greatly benefits a huge number of people.