No they absolutely don't "know this." Are you kidding me right now?
Workers exist to make the people above them feel powerful and to satisfy ego. What you're describing is lip-service they give you.
EDIT: If what people think of me causes them to treat me like ass, yes that's my business.
Workers exist because it's economically more efficient and allows the business to scale. If you sense that's not the case then why are you working there?
So you're telling me that your bosses or the owners of the company, the ones that write your checks, think you do the job for something other than money? Please explain.
A job is a contract, you perform x work for y pay, which is completely on your own volition. You make it sound like you can't quit, so your skills must not be very marketable yet, or maybe you're just afraid to.
Also if I were to act on this mentality, I would have hurt my boss by now so go on keep telling me things that'll get me fired. Please.
So let me get this straight, you took a job that you hate? Then why the fuuck did you take it? Or if you found out after joining, why the fuuck are you still there? Why not quit and find a company where you're treated better or ask for a rate that is fair for the working conditions? If again, you have no marketable skills, then either suck it up until you do, or hop ship anyway until you find bosses that respect your position.
If you're fantasizing about hurting your boss then ask for a new one or fuucking quit, you can't force them to treat you better and it's not worth your mental health at that point. You clearly can't do the job without taking things personally, so maybe you're in the wrong field entirely, or again have little to no marketable skills. You don't have to love your job every day because it's not a place you go to talk about your feelings. You do the work to get money, that's it, anything else is a bonus.
It's funny, you're asking how to have this idgaf mindset, here I am explaining it to you in plain english, and rather than come back with more questions you dismiss it because it doesn't immediately make sense and fit some projection of what you want the answer to be. I'll give you another chance but so far seems like you're desperately seeking confirmation, not genuinely asking for advice.
When I say you that what others think is none of your business, I mean that you should maintain your self respect and focus your energy on things directly in your control. Isn't that the entire point of your strategy here? To make your bosses realize you do it for the opportunities the work brings, and not for them? What better way to do that than to focus all your energy on the task at hand and getting shiit done? If your boss isn't conducive to that and you feel they waste your time on purpose, then express your discontent and maintain your self respect by leaving and going somewhere where your boss will be happy to get out of your way.