To expand on this, it also depends a lot on the job. While you're absolutely correct for software developer positions, there are other completely different positions that offer work from home that actually works.
One prime example is my job. I'm a consultant who works for a (very) large technology company. In my role I have very clearly defined deliverables that require me to get off my butt and do stuff; namely customer visits, presentation, system designs and so forth. And my pay is structured such that I can live on my base without lifting a finger, but I will live a lot better with the commissions I am paid in addition to my base. Yes, my role is partly sales but I have found I am quite good at it (which was a surprise for someone who spent the last 15 years or so locked up in a datacenter). This means I am measured but also driven... and I get to see an almost immediate return on my investment of time and work.
My job is one that works particularly well for work from home. If I don't work, I get paid less... and eventually those "measurables" show that I'm not doing anything. It might take a couple of quarters but eventually I'll get replaced and that'd be my own fault. But if I work hard and do the job I'm asked to do then I see improvements in my paycheck that encourage me to work even harder, and the statistics show that I'm doing my job. Everyone wins, right? Yeah, there are catches but generally it's good for everyone involved. It doesn't hurt that I enjoy the hell out of my job.
Obviously this doesn't work well for all jobs. My job requires customer face-time so it can't be sent to India. Though theoretically about 80% of my job probably could be done by someone in an office in Bangalore, it's that 20% "soft-skill" stuff that can't. 99% of my customers are quite conservative and would NEVER accept someone trying to do my job via Skype or some other technology. It just doesn't work. By the time the generation of kids coming into the workplace who are weaned on Facetime are in the CIO/CEO/CFO positions that I typically talk to I'll either be dead or retired. Software developers are particularly vulnerable to this problem because they are doing work that can be easily offshored. This is why WFH doesn't work for every job.
I guess my point of this ramble is that Work From Home is possible, and can be extremely enjoyable (I consider it a great perk of my job) but first you need to have the right kind of job. And if you don't want to be constantly concerned about losing your job to someone in India or China then you need a job that's customer-facing and profit-making for the company. Software developer is a no... customer-facing consultant is a yes. Finally, a good incentive program to work hard is not required but certainly makes it a lot easier. Just be wary of the risks of such an endeavour; if your boss doesn't also work from home then you might find yourself excluded by the fact that he doesn't see you every day. Mine works from home in another state so I rarely see him... but he covers an entire region so he rarely sees any of his people in person. But again there's that mindset; he works from home too so he knows how to work with employees who also WFH.