A bug is a failure to conform to reasonable expectations based on requirements and norms. A bug is a discrepancy between how code is actually working and how our code was intended to work.
A feature is a unit of functionality that is requested as a requirement or change request. A feature request requires new code to satisfy a case that can’t be handled by the current codebase.
A bug is something that can be reasonably viewed as a problem. This can include things that aren't explicitly in the requirements based on norms of an industry or organization. If a contractor installs a door upside down, a reasonable user would see that as a bug.
A feature is something that hasn't been requested. In many cases, business units expect that something will be done without documenting it anywhere. This is unfair to teams who work hard to deliver a set of requirements only to find the product doesn't meet the unstated expectations that exist in someone's head.