There is a place for hard work. And it is certainly a factor in success, but working nights and weekends only gets you so far and there is a significant diminishing return. Go through a code base and look at commits made past midnight, or 8+ hours into a shift. They are going to lead to more regression issues and technical debt nine times out of ten.
Considering all the tone-deaf ham-fisted nonsense that's come out about Mayer's management style while she was at yahoo, I'm surprised people will still listen to this nonsense. It's just a bunch of people following their selection bias into a cult of personality.
I think the real key is recognizing when working more will help.
There are several common themes to why all those companies had to put in crazy hours but one theme that sticks out is the "oh shit, the user count is growing like crazy and we've got to scale out our servers to handle the exponential workload like YESTERDAY or we're going to DIE!"
It happened to the Youtube engineers, Google, Napster, Etsy, etc. It's a stressful combination of fighting fires and adding capacity at the same time.
For horizontal scaling re-architecting & re-engineering, there is no commercial off-the-shelf or open-source software that let's you install it in one afternoon such that all programmers can just work 40 hours a week without a hiccup. Today, you can't just install a distributed database like Cassandra and fire up more AWS instances and assume those newer technologies that the previous Founders at Work didn't have will prevent your employees from putting in 80 hour weeks for months.
Going from a single instance database to handle 10k to 100k users to a sharded distributed db to handle 100 million is not going to be a 40-hour a week job for startup employees. If any companies have done it with zero overtime, please write a blog highlighting your user traffic growth, database sizes, and migration strategy. That would be a very impressive achievement.
There are people who can be productive (and happy) working more than 40 hours a week.
I very very much doubt you can when it comes to programming. I've been doing this for almost two decades and in this time have only known ONE person who might fit the bill.
20, 40, 80 hours...doesn't matter, getting a group of programmers excited and passionate about getting a taxi from point A to point B is probably unlikely.
But get a group of people who grew up playing D&D and tell them to make it real...