This is completely false (in CA, at least). If I work 1 hour on Monday, say, and 12 on Tuesday, I'm paid for 8 hours for each day.
In fact, my company works like this. I don't often work less than 8 hours, but it happens. Accounting knows how to handle it, and does like a pro.
I've never been hassled.
That aside, the structure of the law and the practice of companies that are supposed to abide by it don't necessarily coincide. Generally even in labor-friendly states employers hold almost all the power and are unlikely to face any serious threat (e.g. via a lawsuit) from employees who challenge illegal labor practices like failing to pay for a full week in which any work is performed. They're especially unlikely to do so in the software industry, which as far as I can tell has a surplus of labor supply who: a) view themselves as Jon Galt or b) are all too eager to "prove" how great they are compared to other "devs" by, e.g., submitting themselves to onerous employment practices or c) believe, wrongly, that the entire industry is based on merit (intellectual, ability-based merit) and that "unfair" labor practices just can't happen to them (because they're so awesome) or d) some combination of all of that. These things have all conspired to help employers depress wages and maintain the completely farcical myth that "getting paid less for doing what you love" is fair.
Right, but this isn't some law of nature. It's something that some people have decided. So we can ask what are the consequences of this belief? What are the ways in which it can be abused? Who does it benefit?
For a limiting case, consider a job that needs to be done by the end of the day. No one on Earth can do it in less than 25 hours. Is it reasonable to expect the work to be done in a day?
In reality, the issue is that no one is exactly sure how long knowledge work will take, so employers and managers will tend to push for more work to be done in less time, and employees can't definitively say "no, that's unreasonable / impossible."
The problem with this mentality is that it doesn't sufficiently penalize managers for being bad at project management. If I'm your manager, I can do a terrible job of managing you, the project, and/or the company but I still have this fantastic way out -- I can just demand that you do what's necessary to make it work.
This is a huge moral hazard, and a broken feed-back loop. It's endemic in software and small owner-run companies.
If both parties trust one another, then it takes as long as it takes, and how to manage that is just an ordinary discussion. More people? Clear roadblock? Redefine requirements? Whatever.
Where there isn't trust, the salary position often gets abused.
In my experience, there are many managers who when confronted with their own performance shortcomings will tend to pull rank and resort to authority. Once this happens, there's no trust from the employee. I.e. as a manager, you can be arbitrarily bad at your job and my only recourse is to find a new manager or to leave the company. I accept that that's the way the world works, but it shows that true trust is difficult to maintain when one party has more power than the other, and a tendency to use it without consequences.
This seems to have some very positive "work life" balancing effects - it motivates engineers to learn things at a deeper level and develop solutions that cut down on inefficiency. It also encourages people to invest thought into solutions and proposals, as opposed to micromanaging how every hour of a project will get spent.
I think its also more fair to clients, too. Inevitably new things take longer the first couple times you do them, and traditionally the full cost of that learning period gets passed on to the client in one way or another. However, something that took two days to put together and figure out the first time may only take two hours to implement the next time - but it's hardly fair that Client B is only billed 2 hours and Client A is billed 16, simply because they were first to market with something.
Here's the problem. In my previous job as a programmer (video game development) we were given more work than was possible in the usual working hours. So we had to do work additional hours (unpaid) to catchup - which was pretty much constant throughout a project. This meant my employer was getting work done for free.
Honestly the additional hours nearly made me quit full-time employment. I felt stressed all the time, and took it out on my friends and family.
Never again.
Now I work for the government and get full overtime pay. All is well :)
Traditionally, a salary was like a retainer... You get paid for 35-40 hours a week, and have that commitment as the work waxed and waned. Hourly workers only work when there is work.
Overtime had everything to do with the type of worker you were, not the way you were paid. For example, a policeman is paid on an annual salary basis, but is eligible for overtime is needed.
In recent years, political and legal efforts have watered down the bite of the depression era regulations. (This helped fuel the economic tranformation of the South) So now a department "lead" at a store like WalMart making someone like $10/hour can be classed as a exempt employee in many states.
I first discovered this at a previous employer, where all of the help desk staff were "supervisors". Some schlub on a phone all day could easily see a 30% dilution of their hourly wage due to mandated, unpaid overtime. That was a real political awakening for me!
These laws exist to discourage employers from abusing overtime and reducing hiring. The "efficiency" of some über productive sap working 80 hours a week means that 1-3 other people don't have a job.
If I'm taking client emails outside of office hours it's because I'm on call. If I'm on call I'm getting paid for it. Simple as that.
But we're talking about a national level. To go back to the current top voted comment in this thread - we need to put this into perspective. I think a more accurate statement would read "More high end tech jobs are becoming flexible."
I'm in the same boat you are - I have the luxury of working from home and the mentality is basically as long as i'm meeting a certain number of billable hours per week, nobody really cares about the mundane details of when the work is getting done.
However, one thing I have noticed in the tech industry is that there are a lot of unwritten expectations on both employees and employers. A very common one is what you cited - "Get the job done if it takes 40 or 60 hours". And thats reasonable in my opinion, given competition in the US and the need to deliver projects on time.
But there are Employer commitments made as part of that, too, which are rarely fulfilled. Every company i've worked for in the past 10 years has had some type of policy around bonuses. And every year, measures outside of my control dictate the terms of those. Whether its the economy, stock price, or sales performance (I have nothing to do with sales) there's a different excuse every year, and the payout is laughable compared to the level of bonuses senior management get.
So it seems like we've got a situation where people "Go the extra mile", "Play on the A Team", or otherwise make personal sacrifices to help an employer, whereas employers regularly remit on the obligations they've set to their employees.
Many jobs in the modern economy are flexible. You do your work whenever. Maybe you carve out six hours a day to program but if you need to take a client call or answer an email out of hours you do it and you don't feel bad because you can goof off during the day when you like to as long as the work gets done.
Tracking this would be ridiculous and most employers will actually remove that flexibility in order to make sure that they comply with the law. People who like flexibility will lose and so will the economy. We'll become much less responsive.