Steam just tracks how long the program is running. My old rig played Dark Souls 3 24/7 sometimes because the .exe file would glitch and stay open until I manually terminated it. I averaged 168 hours a week coming back from a 2 week vacation once.
It normally would go on sleep mode and be off anyway so I hadn't noticed it was on when I left. That was how I learned that the .exe would just stay running and not allow things to shut off normally when idle.