The skill to distinguish on whether the extra work will help you get paid more in the future is essential. Developing this skill makes it a bet instead of just working more.
It's not possible to do everything. That's when your coworker that dedicates every waking moment to the job will outpace you and then set the standards.
I guess I should add "for someone else". In that case it's just bad negotiating skills, but at the same time companies have a lot more bargaining power over individual employees, and it's especially bad in the software industry.