The reality of one's lack of value to one's own employer is often baffling. It makes you wonder how anyone manages to stay employed at all, since apparently everyone is replicable and unimportant. I have been through layoffs where other people on my team, doing the same job I did approximately as well, got laid off. No explanation given for why them and not me. And it could happen to me at any time. It doesn't matter…
An employment relationship can offer a lot of things for both sides. For the employer, your labor of course. For the employee, a salary of course. But it can also offer experience, access to other talented and intelligent individuals and access to capital to learn and try things, networking, relationships, opportunities for promotion and perhaps opportunities to find better employment elsewhere, or the skills and/or connections to start your own business.
Your attitude toward work should be the same as the attitude you take towards the rest of your life. You can "rot" or you can make the most of every opportunity.