During my first years in my career as a software developer I was very confident that my absolute number one responsibility and priority was to write code. That's my purpose as a software developer (I thought).
A couple of years later I realized that I was so wrong.
Your job as a software developer
People may believe they hire or employ you to write code.
But you are hired to solve a business problem that gives the business and customers real value.
Your job is not to refactor whenever you have spare time.
Your job is to refactor when it matters, and instead spend time helping your colleagues solve a business problem that gives the business and customers real value.
Your job is not to develop a story because it is well written and prioritised if you feel it won't get the job done.
Your job is to tell business just that, and let them know your thoughts and reasons why the story is a bad solution for the problem, and give them another idea. They'll always appreciate your enthusiasm and interest in building great products for the company. If they don't listen, tell them again. If they still don't listen and this pattern repeats itself, consider leaving the company because you deserve more and they don't deserve you.
Your job is not necessarily to execute on whatever a manager says and write code for it if you feel it is not a good fit for the solution and/or product.
Your job is to tell the manager that the solution does not fit very well into the product, and provide an alternative solution which is a better approach.
Your knowledge is way too valuable to keep your mouth shut
Remember that as a developer you have a very unique position within the company - you're the only one that knows how the systems actually work.
To keep telling business about bad ideas and providing alternatives and pushing and giving feedback in the interest of building great products takes time and energy, but as long as you're honest and pragmatic, really most business people will love your enthusiasm and appreciate your knowledge and feedback and will incorporate that into their decision-making process. Not always of course, but a lot of time. This is also an absolutely essential part in building a strong trust between business and the development teams.
It's of high importance that you are happy at your job and satisfied, so of course sometimes it can be nice to spend some extra time doing some refactoring or experimenting with a new tool. After all we're just humans that have emotions and feelings and must be allowed to do just that. But just remember that your primary responsibility is not to keep writing code, but to solve one of the real existing business problems.
So whatever you do tomorrow, remember that your single most important responsibility is to solve a business problem, sometimes (but not always) by writing code.