Can your job description be in any sense likened to guard labor? That might change my interpretation of your position somewhat. (I don't mean to pry, by the way; disclose as much as you feel comfortable disclosing.)
Why do you interpret the situation as reflecting poorly on your work ethic? Both you and your employer have exit clauses from this work contract, and nothing you wrote suggests you are deceiving your employer into keeping you on the rolls. I'd feel perfectly OK about the situation, ethically at least.
Emotionally is, I agree, a different matter. I once found myself in a slightly similar situation (temporary rather than long-term, a couple months more or less). My issue wasn't so much that no-one was interested in giving me work to do, and that I could for a while show up at the office a couple of hours a day and get away with it. The main issue was that I wouldn't knowingly violate the exclusivity clauses in my contract, and so this job was preventing me from doing meaningful work. So eventually I quit.
But I wouldn't mind at all a situation in which I got paid by someone who didn't get anything in return, if the contract otherwise allowed me to to meaningful work. (You wouldn't call someone like that an employer but probably a "patron".) I'm self-motivated enough that I believe this would be a net gain to society.
it seems fairly rational in some sense that I take from the irrational
...and you give to the rational. A modern Robin Hood, I like that. ;)
Can your job description be in any sense likened to guard labor?
It's "firefighter labor." Supposedly, if the system I support goes down, it's $1,000,000 per hour, which would mean if I save an hour of downtime, I've paid my salary for several years. But the number was likely a wild guess in the first place, and I received it 5th hand, so I have no idea as to the truth of the matter. All I know for sure is that it's an important and costly system.
I can't feel that number at all, and certainly no one around me seems to care much about it, either...
Related to: Outside the Laboratory, Ghosts in the Machine
We've all observed how people can be very smart in some contexts, and stupid in others. People compartmentalize, which has been previously hypothesized as the reason for some epic failures to understand things that should be obvious.
It's also important to remember that we are not immune. To that end, I want to start off by considering some comfortable examples, where someone else is the butt of the joke, and then consider examples which might make you more uneasy.
The reassuring cases concern smart people who become stupid when confronted with our area of expertise. If you're a software developer, that tends to be people who can't figure out something basic about Windows. "I've tried closing the app and restarting, and I've tried rebooting, and it doesn't work, I still can't find my file." You take a deep breath, refrain from rolling your eyes and asking what the heck their mental model is, what they think closing-and-restarting has to do with a misplaced file, and you go looking for some obvious places, like the Desktop, where they keep all their files but somehow neglected to look this time. If it's not there, chances are it will be in My Documents.
It's sometimes draining to be called on for this kind of thing, but it can be reassuring. My dad is a high calibre mathematician, dealing in abstractions at a level that seems stratospheric compared to my rusty-college-math. But we sometimes get into conversations like the above, and I get a slightly guilty self-esteem boost from them.
Now, the harder question: how do we compartmentalize?
I propose work-life compartmentalization as a case study. "Work-life balance" is how we rationalize that separation. It's OK, we think, to put up with some unpleasantness from 9 to 5, as long as we can look forward to getting home, kicking our shoes off and relaxing, alone or among family or friends. And perhaps that's reasonable enough.
But this logic leads many people to tolerate: stress, taking orders, doing work that we think is meaningless, filling out paperwork that will never actually be read, pouring our energy into projects we're certain are failure-bound but never speaking up about that to avoid being branded "not a team player", being bored in endless meetings which are thinly disguised status games, feeling unproductive and stupid but grinding on anyway because it's "office hours" and that's when we are supposed to work, and so on.
And those are only the milder symptoms. Workplace bullying, crunch mode, dodgy workplace ethics are worryingly prevalent. (There are large variations in this type of workplace toxicity; some of us are lucky enough to never catch but a whiff of it, some of us unfortunately are exposed to a high degree. That these are real and widespread phenomena is evidenced by the success of TV shows showing office life as its darkest; humor is a defense mechanism.)
Things snapped into focus for me one day when a manager asked me to lie to a client about my education record in order to get a contract. I refused, expecting to be fired; that didn't happen. Had I really been at risk? The incident anyway fueled a resolve to try and apply at work the same standards that I do in life - when I think rationally.
In everyday life, rationality suggests we try to avoid boredom, tells us it's unwise to make promises we can't keep, to avoid getting entangled in our own lies, and so on. What might happen if we tried to apply the same standards in the workplace?
Instead of tolerating boredom in meetings, you may find it more effective to apply a set of criteria to any meeting - does it have an agenda, a list of participants, a set ending time and a known objective - and not show up if it doesn't meet them.
You might refuse to give long-term schedule estimate for tasks that you didn't really believe in, and instead try breaking the task down, working in short timeboxed iterations and updating your estimates based on observed reality, committing only to as much work as is compatible with maintaining peak productivity.
You might stop tolerating the most egregious status games that go on in the workplace, and strive instead for effective collective action: teamwork.
Those would be merely sane behaviours. It is, perhaps, optional to extend this thinking to actually challenging the usual workplace norms, and starting to do things differently just because they would be better that way. The world is crazy, and that includes the world of work. People who insist on not checking their brain at the door of the workplace are still few and far between, and to really change a workplace it takes a critical mass of them.
But I've seen it happen, and helped it happen, and the results make me want to find out more about other areas where I still compartmentalize. The prospect is a little scary - I still find it unpleasant to find out I've been stupid - but also exciting.