I have done that in the past and I agree that there are (extremely) rare situations where this is helpful or might be warranted. In general though, this is not good behavior and I would personally advise against this.
One time a bug bothered me to no end, I kept thinking about it all the time. I then sat down at 10pm and started debugging / tinkering. I finally solved the issue some time that night and got back to work the next day, reporting my success to the team. Great.
While it was a helpful fix for the team it wasn't super important. After I reflected some of this process, I realized that it wasn't my curiosity or passion that was driving me. It was a bad relationship with work. I was still quite new and I wanted to prove myself - this pressure is what drove me.
My endeavor brought next to no personal advantage, rather it was a detriment. I spent my free time, my sleep even, to fix a mediocre bug which I simply could have done the next day. Even if I took two or three days, no bottom line would have been affected. Barely anyone would have bothered, asked or cared. So what's left was some idea of opportunity cost - since the bug was fixed I was now free for other work. But the value of that is also hypothetical!
In the end, I think working for someone else, especially a generic corporation, is way different from personal projects or startup products that you are passionate about and really deeply care that it succeeds. I will reliably perform my duties and try to be efficient at it, but I will NEVER let big corpos take away time from my life again just to improve some managers standing or bonus.
You can definitely find a good balance between fulfilling your position at or above expectations while respecting your personal life and health. I do not hesitate to take sick days, I prioritize my family and friends. Working 4 days per week has been show to drastically reduce sick days and other issues so while it might seem counterintuitive to some, I really believe that it's actually beneficial for everyone.
Note: I typically have a weird productivity surge between sunset and 2am that never gets used for work, obviously. Something about the early darkness triggers my mind...