As a person that likes programming but doesn't like some parts of the job it helps me to think about this:
"You are paid for the parts of the work you don't like".
The parts you like are the things you do after work for free as a hobby (think personal projects, playing with a new language, dabbling in microcontrollers...)
It is possible for a business to pay someone for the parts they don't like even when the parts they don't like do not contribute to profit or financial success in some way. This is not only demoralizing, it is usually boring, and usually not a good caraeer strategy because it is not sustainable.
I feel like "My Head Count" is more important than outcomes at many companies.
"You are paid for the parts of the work you don't like".
The parts you like are the things you do after work for free as a hobby (think personal projects, playing with a new language, dabbling in microcontrollers...)