Your question hits a lot of people very squarely where they live, in a place that can be pretty painful. Bug is not a very precise technical term, but it certainly has a lot of emotional baggage.
Where you work, do people consider features to be planned improvements, and bug fixes to be unplanned improvements? When a developer created code with bugs under the crunch of an all too short schedule, is he or she called back to be accountable for work that might not have been as thorough as needed? As the expert on the code, do people give kudos for a rapid and responsive solution? Do habitual under estimators have consequences after taking credit for features and for being fast, even though finding and fixing their bugs was very frustrating for testers and customers, and very time consuming for developers working on maintenance?
Of course they don't. The more bugs we have, the less pride of workmanship we have, the less accomplished our team. If you are working on features, you must be trusted and skilled. If on bugs, not so much. Features get a thank you and a party when they are done. Bugs get the silent treatment or a retrospective that discusses how late the release was because we had so many bugs. Maybe where you work the retrospective talks about how the features unfolded into additional unanticipated functional and systems requirements that were not part of the estimate but were resolved with overtime and heroic efforts from team members?
Making a feature is a task. Fixing a bug is a task. What we call bugs are often defects that relate to features we said were done, or missing parts that are due to incomplete understanding of functional or system requirements (or in Agile, user stories or use cases that are incomplete or missing alternative flows).
If our customer visible code is constantly constructed in advance of the underlying support, this is a design or project management problem. We have TDD and unit testing, so ideally, we can be pretty thorough in our testing and pretty selective about exactly when we expose features through the UI to testers, customers, or product management.
Projects often use rapid UI prototyping to show a user interface that has no code behind it. It does not do development any favors if product management believes that 80% of the work is done when that demo is shown, but the project continues to run for a long time. Weigh carefully how far you let your prototypes run ahead of your field ready product.
Agile aims to break the contract mentality and makes collaboration using prototypes more palatable. The relationship and communication between developers and stakeholders needs a high degree of give and take. It helps to methodically manage requirements using a burn down list or other way to limit scope and shorten the time line that is subject to estimation.
Part of our problem is how we track progress. If we have features described by percentage complete, we essentially take credit for something before it is accomplished. Estimates percentage complete are extremely unreliable. If we need to show progress, we should break things down to the level where we can say something that is considered important in our project that stands alone as a cohesive object that provides functionality is completely done. Instead of partially complete milestones, only use fully complete inch-pebbles.
For the work that you describe, if it brings more pride and motivation into the team, I definitely vote for calling it a task and not a bug.