Grass is always greener.
People also tend to want their jobs to provide meaning to their lives. That is a luxury. For most people, a job is something you do to enable the rest of your life.
Neither was fun but they are very different to a 9 hour stint programming, when I worked physical jobs I could go home, have a shower and still had the energy to go out socialising where now when I get in I just want to veg with a book as I'm mentally spent.
Some of it might be to do with age but I switched careers in my mid-20's and it was the same at the start of my programming career.
It doesn't get easier, you just get better.
That's me. I think it's age but a job where I am more active and/or outside would help for sure. When I worked as mechanical engineer I often had to go to the workshop which already was a nice break from the desk. There were also physical things to handle which is good for the soul. Now I am always at the desk or meeting rooms and everything is abstract.
This desire is a coping mechanism. Because the latter view, that the job is just to pay for your life, makes you discover that it also robs you out of all of it. Even the 9-5 job is way more than 50% of your wake time, after accounting for commute and energy drain.