My opinion:
It depends, and I've changed my attitude a few times. To a certain extent, my attitude has depended on if I feel obligated to provide a return on investment beyond the simple calculation of my worth and rarity as an employee vs. my pay rate.
When I was in high school, my first job was minimum wage doing janitorial and facility maintenance work at a local recreation club. I was basically paid a wage to do a set of tasks, and although I didn't think as a kid I deserved to get paid any more than min wage, I certainly was not motivated to work any harder than necessary to get the job done well enough to keep my boss from saying I wasn't doing it right. I ended up quitting that job because although I was working pretty hard (I thought), he came down on me for slacking off. Nothing had been invested in me other than the usual risk any employer takes when they hire someone, and as a result I felt obligated no further than to do my assigned tasks "good enough".
My next job was the opposite though. I got a job making around twice min wage in an office environment, and the wage was high enough that I figured I had better be unusually productive to earn such an unusually high salary as a high school student. For me, this was a complete reversal in attitude about work and my wage, and it was entirely based on the amount of pay. Although I felt I was "worth" the higher pay, it was because I was doing a job that not everyone could do so I figured I should also be producing more than everyone else.
Still, when it came time to choose between joining the military or an essentially guaranteed internship through college and a very well paying job after graduation, I chose the military.
Later in life after graduating from the Academy, I wasn't making much money as a Lt. It was enough since I wasn't married, but the other married guys were really struggling especially if they had kids. At that time, I figured I was a bit underpaid for the following reason - in general, people with my abilities, experience, and training, made far more than I did. More than double on average in fact. There were perfectly valid reasons why this was so (mostly payback for the money put into my training), but it's still tough to go to work and do a job that less than 0.1% of the world's population can do, yet get paid what worked out to about $10/hr. What made it worth it of course, was that the job was exactly what I wanted to do with my life. The salary was in fact just a bonus because they were paying me to do what I always wanted to do anyway. In addition, I had signed up for the job in part because I wanted to be part of something bigger than myself. Even if I hadn't gone to pilot training, I would still be doing a job for a greater cause.
The upshot of this was that I was working only to satisfy my personal desires, internal drive, and sense of duty to fulfill the oath of office I'd taken. I didn't feel like I owed anyone anything, because the work I was doing out of pure self-motivation in my opinion outweighed the money that had been expended to secure my services.
Over time however, things shifted again. My conservative estimate is that around $20,000,000 (yea 20 mil) has been spent on my training throughout my career, and I'm getting paid a hell of a lot more now than I used to. My skills, abilities, experience, and training have further reduced the number of people who are able to do my job as well as I can, but my salary clearly matches the rarity of my qualifications. So several years ago, my attitude flipped back from "the salary doesn't really match what I'm doing", to "I better work my butt off so what I give the organization matches the resources poured into keeping me on the roster."
It's an external motivator, and frankly it adds stress to my job. I have an obligation to pay back, to give something tangible back to the organization in order to justify the resources expended on training and retaining me. As odd as that seems, to a certain extent that is a total de-motivator because I'm working to fulfill someone else's expectations, not my own.
So anyhow, that's the random thought that made me start the thread in the first place... the realization that I quit working for myself a few years ago and that this has negatively impacted how I feel about my job. I work harder, but it's because I owe something to someone, not because I particularly want to.